So, I had a question earlier about mod_rewrite which you find here mod_rewrite changing /subpage/ to /subpage
But now I have a whole new problem with this… How do I make GET work?
Like if I need to pass some variables with GET, ex: mypage.com/subpage/?name=Jamie
My mod_rewrite looks like this:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([A-Za-z0-9-]+)/?$ ?p=$1 [L]
I understand that the problem probably has to do with that I already pass and rewrite one GET request. So how do i tweak this to accept any other GET-request i might need to process?
UPDATE:
To clarify the problem a bit. If I try the url mypage.com/subpage/?name=Jamie page loads as if i used url mypage.com/subpage/ and “name” is never passed. Using my original url mypage.com?p=subpage&name=Jamie works as it should.
I guess i need to tweak this somehow… but how?
Thank you for taking your time reading my probably easy question!
Use the
QSAflag — Query String Append: