So I’ve got an htaccess file that’s a bit bulky, but here’s the rewrite code that affects this question:
RewriteCond %{REQUEST_URI} !^/(index|upload|gyazo|image|short)
RewriteRule ^admin/([^/]*)/? admin.php?p=$1
What I wanted to know is if there was a way to rewrite a url in such a way so that the first parameter after my rewrite parameters can use a question mark instead of an ampersand.
so that I can write urls like this
http://mydomain.com/admin/page?example=true¶m2=false
when really the page requested would be something like this:
http://mydomain.com/admin.php?p=page&example=true¶m2=false
and so on.
Is there any way to do this?
Your
RewriteRuleshould work as it is. Just add QSA flag and query string will be appened to admin.php?p=$1&…