I use the following .htaccess file to send all my requests to the index file.
But now I would like to ignore everything that comes from the /static
folder.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
So here’s the thing:
- index.php
- static/
----img
--------bg.jpg
----css
--------main.css
Currently it is so that on subpages of the style and the images can no longer be loaded. And I would like to renounce the use of complete paths.
2
Answers
Well, you need to add an exception, right?
You may try this rule:
Using
THE_REQUEST
is preferred for negative conditions asTHE_REQUEST
variable is not overwritten with other rules.