mod rewrite
Posted by: toonmariner
Posted on: 2007-10-30 20:04:00
Hi guys.
I am using the following .htaccess file to implement friendly urls on my site.
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^([^/]*)?admin/(.*)? $1admin/$2 [NC,L]
RewriteRule ^rss/(.*)? rss/$1 [NC,L]
RewriteRule ^tmp/(.*)? tmp/$1 [NC,L]
RewriteRule !.(gif|jpg|png|css|pdf|eps|mpg|mpeg|mp4|mp3(.*)?|flv(.*)?|mov|swf(.*)?|js|php(.*)?|htc|pl(.*)?|pm)$ index.php [NC,L]
I have this on many other servers working as expected however on dreamhost the urls are ok but calling other files is not.
If I put http://www.mysite.com/imgs/pics/nopic.gif (which exists) php is being executed and searching for templates in my site.
I was under the impression that the final regex in the .htaccess would only redirect to the index if non of those patterns matched...
Can anyone please hazard a guess as to what I am missing here?
Thanks people...