Hello. I'm using the following rewrite:
rewrite ^/dir1/(.*)$ /dir2/index.php?title=$1
If someone tries accessing: /dir1/Page_title
Then the page served is: /dir2/index.php?title=Page_title
This works great, but sometimes scripts try to add parameters to the pages (like Google Analytics when viewing traffic flow).
They might try to load up: /dir1/Page_title?cPath=abc&location=xyz
Then the page served is: /dir2/index.php?title=Page_title?cPath=abc&location=xyz
This is a problem because I have two question marks, and the parameters are not passing correctly.
What I would like to do is to modify my rewrite rule to change any ? into &
Then the scripts might try to load up: /dir1/Page_title?cPath=abc&location=xyz
But the page served is: /dir2/index.php?title=Page_title&cPath=abc&location=xyz