views:

37

answers:

1

When I use URL rewrite styles my scripts are rewritten too. How can I fix this?

For example, I have redirection /contact/ /index.php?page=contact, css and script files style and scripts folder, so I want style/layout.css to still be readable by my program after a redirect.

A: 

If I understood correctly your question you need something like this:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule xxx xxx

In this mode it will redirect only if the file requested doesn't exist.

Alekc