Answer the question
In order to leave comments, you need to log in
How to redirect by multiple filters using .htaccess?
Now a redirect is configured from any page to the main
.htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteRule ^$index.html
RewriteRule ^([^.]+)$index.html
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_URI} !^domain/img/.*$
RewriteCond %{REQUEST_URI} !^domain/video/.*$
RewriteCond %{REQUEST_URI} .....
RewriteCond %{REQUEST_URI} и так далее, это и если, и будет копиться условия до первого рула, ! - знак отрицания.
RewriteRule а тут что должно произойти
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [ R=301,L]
RewriteRule ^$index.html
RewriteRule ^([^.]+)$index.html
To display folders and files as usual.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question