Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

How to redirect pages with php extension

Started by Samuele Masetto 9 years ago · 3 replies · 862 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 complanar, 6 days ago
6 138 13 hours ago
Support · by Rick Beebe, 6 days ago
2 100 2 days ago
Support · by blu3prince, 3 days ago
0 50 3 days ago
Support · by alex, 4 days ago
2 92 3 days ago
Support · by Marcel, 2 weeks ago
1 142 4 days ago