L
L
lightalex2016-04-13 22:36:14
htaccess
lightalex, 2016-04-13 22:36:14

How to add an exception to .htaccess?

Hello!
There is htaccess:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]
</IfModule>

How to add an exception for several directories - files, images, php/include?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2016-04-14
@lightalex

RewriteCond %{REQUEST_URI} !^files/$
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]

RewriteCond %{REQUEST_URI} !^images/$
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]

or so
RewriteCond %{REQUEST_URI} !^(images|files|upload|test)/$

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question