I'm trying to use Apache's mod_rewrite to rewrite a url to point into my php script.
I have a URL: -
http://www.plop.com/carpark/5/
and I want it redirected to: -
http://www.plop.com/parking/carpark.php?cp=5
So I create the rule: -
RewriteRule carpark/([0-9]+)/?$ /parking/carpark.php?cp=$1 [L]
This works fine on my Apache setup on Windows, but on my linux box it's getting to the script (i.e. it's matching the URL) but the cp variable ($1) doesn't seem to be passed into the script. i.e my php page is being passed the querystring "?cp=" instead of "?cp=5". Any idea what could be wrong? As I previously said, it works on my windows machine. Both are running Apache 1.3.
Thanks for any help!