Answer the question
In order to leave comments, you need to log in
How to make an exception in htaccess?
Tell me please. There are these entries in htaccess:
RewriteCond %{THE_REQUEST} ^[AZ]{3,9}\ /([^/]+/)*(default|index|main)\.(html|php|htm)\ HTTP / [NC]
RewriteRule ^(([^/]+/)*)(default|main|index)\.(html|php|htm)$ https://site.ru/$1 [L,R=301]
How to add an exception for the /administrator page? She uses index.php to login to the admin area.
Answer the question
In order to leave comments, you need to log in
RewriteCond %{THE_REQUEST} ^\S+\ /(([^?/]+/)*)(default|index|main)\.(htm|php) [NC]
RewriteCond %1 !^administrator/
RewriteRule ^ https://site.ru/%1 [L,R=301,NE]
!
- denial
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(default|index|main)\.(html|php|htm)\ HTTP/ [NC]
RewriteCond %{THE_REQUEST} !^тут ваша страничка/% [NC]
RewriteRule ^(([^/]+/)*)(default|main|index)\.(html|php|htm)$ https://site.ru/$1 [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question