I have two servers using mod_rewrite and the same exact directives, but they are rewriting two different ways. I have spent hours trying to find answers to this, but haven't had any luck.
Here is the rewrite directive that is acting wacky:
/***************************************/
RewriteCond %{REQUEST_URI} /tj_img/(.+)$
RewriteRule /tj_img/([0-9]+)/([0-9]+).(.+)$ /inc/getimage.php?page_id=$1&description_id=$2
/***************************************/
Now on one machine it is working properly and rewriting that as:
rewrite /tj_img/5/1.gif -> /inc/getimage.php?page_id=5&description_id=1
However, on another machine it is rewriting it as:
rewrite /tj_img/5/1.gif -> /inc/getimage.php?page_id=5/tj_img/5/1.gifdescription_id=1
For some reason the "&" character is being replaced by the entire URI...?
Any ideas, suggestions, or solutions about this issue would be much appreciated!