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

How to redirect pages with php extension

Started by Samuele Masetto 9 years ago · 3 replies · 779 views
9 years ago

I'm moving a old php site in Grav.
I'd like to point old ulrs to new pages.
I tried to use route aliases in new page like this:

YAML
routes:
  aliases:
      - '/congressi.php?id_evento=296'

but I have "Page not found".
Is it possibile to do it in Grav without to use .htaccess redirect?
Thanks

8 years ago

Another solution could be the full url to that page instead of the /... only, give that a go :)?

8 years ago

I'm pretty sure you'd have to do that outside Grav in your .htaccess or other server config file. A standard Grav server config will intercept *.php paths, so you'd need them to find your redirects before they reach Grav's settings. I'm 90% sure ;)

And congratulations on behalf of all web users for taking the trouble to redirect! :) Not even some of the giant wealthy sites like Google and Microsoft bother with this important step. I see dead links to their old URL schemes a lot, even from within their own sites.

Suggested topics

Topic Participants Replies Views Activity
Support · by Anna, 16 hours ago
1 46 9 hours ago
Support · by gtx, 1 week ago
4 227 2 days ago
Support · by Paul Hodges, 2 weeks ago
13 277 5 days ago
Support · by Anna, 3 weeks ago
9 334 1 week ago
Support · by TomW, 2 weeks ago
4 188 2 weeks ago