Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Mod_rewrite help

Solved by Jamie Pickett View solution

Started by Jamie Pickett 6 years ago · 1 replies · 691 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 webmasterodp, 1 week ago
4 160 6 days ago
Support · by nwhitfield, 1 week ago
2 137 1 week ago
Support · by stell, 3 weeks ago
5 370 2 weeks ago
Support · by gravinator, 1 month ago
5 562 2 weeks ago
Support · by Gravver, 3 weeks ago
6 348 3 weeks ago