Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Redirect without loosing .html-ending

Started by Muut Archive 10 years ago · 4 replies · 448 views
10 years ago

Hi
Is there a possibility to redirect an url like /example/test.html to http://otherdomain/test.html? If i redirect as it is written in the grav documentary, it always looses the .html... What have I done wrong, how can I fix this?

10 years ago

How did you configure the redirect so I can test/debug???

10 years ago

Thank you for your reply.
Actually I've redirected it like this:

TXT
redirects:
  '/stadt/(.*)': 'http://energiestadt.tk/'

so It redirects all to the root directory.
But what I would like to have is that the original /stadt/index.html and /stadt/shoppingmall.html etc is redirected to http://energiestadt.tk/index.html or http://energiestadt.tk/shoppingmall.html etc.
If I do it like this:

TXT
redirects:
 '/stadt/*': 'http://energiestadt.tk/$1'

It redirects /stadt/shoppingmall.html to http://energiestadt.tk/shoppingmall instead of http://energiestadt.tk/shoppingmall.html

10 years ago

Ok, thanks for fixing it. When will this be in the master / normal branch?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1357 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2954 9 years ago
Archive · by Muut Archive, 9 years ago
3 1120 9 years ago