Odd mod_rewrite behaviour
Posted by: raf
Posted on: 2008-02-10 04:22:00
Hello,
I've just signed up here and so far everything is very easy and swift and have managed to transfer most things over from my old host without a problem. I am however seeing some odd mod_rewrite behaviour. This is what I use:
RewriteCond %{REQUEST_URI} !\.(png|gif|jpg|css|js|html|htm|txt|php|zip)$
RewriteBase stuff/
RewriteRule .* index.php?what=$1 [L]
With my previous host (and with XAMPP), "what" was simply something like:
dir/subdir/page
where the full path for that would be:
http://mydomain.com/stuff/dir/subdir/page
"what" is then parsed by PHP, using $_GET['what']. Unfortunately, with dreamhost, "what" is being returned as this:
http://mydomain.com/home/raf/mydomain.com/stuff/dir/subdir/page//subdir/page
It's very weird, especially the repetition at the end. I've tried all sorts of things and other more restrictive regular expressions, but I can't seem to change what's going on without breaking it entirely.
Any insight is greatly appreciated!
Edited by raf on 02/10/08 04:33 AM (server time).