Using mod_rewrite to work with a custom string
-
05-07-2019 - |
Question
I want to rewrite everything that uses this pattern...
/test/?TEXT=TRUE
and allow it to be /test/TEXT
AND /test/TEXT2
, and so on.
Solution
Yes you can. Create 2 rules:
RewriteRule ^/test/help$ /test/?help=true [L]
RewriteRule ^/test/(.*)$ /test/?random=$1
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow