Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Mod_rewrite help

Solved by Jamie Pickett View solution

Started by Jamie Pickett 6 years ago · 1 replies · 777 views
6 years ago

I have a need for mod_rewrite and specifically using the pass through flag. I am trying to redirect from a URL that does not exist through to one that does, and each time I am returned the Grav 404 page for my site. This is an example of the rule that I am using:

TXT
RewriteRule ^technologies/analytics/gettingstarted/?$ /gettingstarted/analytics/ [PT,L]

If I change the rule up a little to the following, it works:

TXT
RewriteRule ^technologies/analytics/gettingstarted/?$ /test.html [PT,L]

Any help / insight would be appreciated.

6 years ago Solution

I ditched the mod_rewrite and started using the Grav routing.

Updated... Due to a fatal error I am getting with the internal routing, I am back to investigating the mod_rewrites as a solution.

Updated again, figured out why Grav was throwing fatal exception and will address in another issue (/forum/support/fatal-error-when-routing-to-page-that-is-not-found-t3643?u=pickettj)

last edited 09/21/20 by Jamie Pickett

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 228 9 hours ago
Support · by alex, 2 months ago
8 667 24 hours ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 160 3 days ago
Support · by TomW, 6 days ago
2 106 6 days ago