Answer the question
In order to leave comments, you need to log in
.htaccess how to set exception for folder with scripts?
Hello. When I made the rules for .htaccess, I stumbled at one point.
Here is my htaccess:
RewriteEngine on
RewriteBase /
RedirectMatch 403 /\..*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !.html$
RewriteCond %{REQUEST_URI} !^/admin
RewriteRule (.+) $1/ [R=301,L]
RewriteRule . index.php
RewriteCond %{HTTP_HOST} ^www.site.ru$ [NC]
RewriteRule ^(.*)$ http://site.ru/$1 [R=301,L]
Answer the question
In order to leave comments, you need to log in
RewriteEngine on
RewriteBase /
RedirectMatch 403 /\..*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !.html$
RewriteCond %{REQUEST_URI} !^/admin
RewriteCond %{REQUEST_URI} !^/libs # <-------
RewriteRule (.+) $1/ [R=301,L]
RewriteCond %{REQUEST_URI} !^/libs # <-------
RewriteRule . index.php
RewriteCond %{HTTP_HOST} ^www.site.ru$ [NC]
RewriteRule ^(.*)$ http://site.ru/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question