I have a weird problem with a mod_rewrite condition / rule.
This is the condition and rule I'm using.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?params=$1 [QSA,L]
My problem is if I visit www.example.com and www.example.com/page it loads fine but when I try to load www.example.com/page/category it loads the page but cannot find the css and javascript. It tries to load them from page/css instead of the / directory.
Any thoughts on what I've done wrong? I had a search on here and tried a few things like add
RewriteCond $1 !\.(js|ico|gif|jpg|png|css|html|swf|mp3|wav|txt)$
and
RewriteRule ^(images|css|javascript)(.*)$ index.php?params=$1 [QSA,L]
But that didn't seem to make much difference.
Thanks for reading