Hello Everyone!
I am trying to figure out how to do something that sounds fairly simple, but just can't get it to do what I want.
I have a condition set up where I am redirecting all of my php scripts back through index.php:
RewriteCond $1 !^(index.php) [NC]
RewriteRule ^([^/]*\.php) \
index.php?page=$1 [PT,L]
Now, a slight problem. I am trying to pass all of the $_GET variables from that URL string into the index.php page as well.
For instance
I want callingscript.php?variable1=blah&variable2=blahblah.....
to translate to:
index.php?page=callingscript.php&variable1=blah&variable2=blahblah.....
Note that there is no pre-defined number of variables being sent, it could be any number.
I changed the above rule to look like this, but it throws 500 errors, or, it doesn't work as expected:
RewriteCond $1 !^(index.php) [NC]
RewriteRule ^([^/]*\.php)\?(.*) \
index.php?page=$1&$2 [PT,L]
Can someone shed some light on what to do here?
Thank you!