I am trying to make Apache send:
http://mydomain.com/these/are/arguments/mmmk
to:
http://mydomain.com/?pages=these/are/arguments/mmmk
Such that $_GET['pages'] will display these/are/arguments/mmmk.
I have set 'AllowEncodedSlashes' to On.
The rule needs to be able to handle trailing slashes, and when there is no subpages (like http://mydomain.com)
Does anyone know how to accomplish this task?
In order to not rewrite images/scripts you'll need to make sure the file or directory does not exist first in your .htaccess file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite everything else through the pages parameter
RewriteRule ^(.+)$ /?pages=$1 [L]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With