# https://city.site.com/search/
RewriteCond %{HTTP_HOST} ^(?>www\.|)([\w-]+)\.site\.com$ [NC]
RewriteRule ^search/$ list.php?crt_city=%1 [L,QSA]
# https://city.site.com/
RewriteCond %{HTTP_HOST} ^(?>www\.|)([\w-]+)\.site\.com$ [NC]
RewriteRule ^$ st.php?crt_dealer=%1 [L,QSA]
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
RewriteRule (.*) index.php?q=$1 [L]
?q=
RewriteRule ^news/2021/professor-bez-shtanov\.html$ https://www.crawler.pro/news/2021/produser-dlya-marketologa/professor-bez-shtanov.html [R=301,L]
rewrite ^/url1/(url2/url3/) https://domain2.ru/$1 permanent;
if ($request_uri ~ '^/url1/(url2/url3/.*)') {
return 301 https://domain2.ru/$1;
}
RewriteCond %{REQUEST_URI} !/gorod_is_
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/gorod_is_
RewriteRule ^(.*[^/])$ $1/ [L,R=301]
RewriteCond %{QUERY_STRING} ^SMARTY_DEBUG
RewriteRule ^category/$ https://site.ru/category/? [R=301,L]
RewriteCond %{THE_REQUEST} ^\S+\s/category/\?SMARTY_DEBUG
RewriteRule ^ https://site.ru/category/? [R=301,L]
RewriteEngine on
RewriteCond %{QUERY_STRING} !^get=[a-zA-Z0-9-_]+$
RewriteRule ^money\.php - [R=404,L]
ErrorDocument 404 /file.html
RewriteEngine on
RewriteRule ^(katalog/[^.]+?)/?$ https://www.site.ru/$1.html [R=301,L]
^(\S+)\R(?=(?:\S+\R)*?\1$)
All
. Если переключить на Any
, то будет поведение как нужно.AuthType Basic
AuthName "Restricted Resource"
AuthUserFile /var/www/.htpasswd
Require valid-user
Order Allow,Deny
Allow from 192.168.1.2
Satisfy Any
<RequireAll>
и <RequireAny>
By default all Require directives are handled as though contained within a<RequireAny>
container directive. In other words, if any of the specified authorization methods succeed, then authorization is granted.
<RequireAny>
.AuthType Basic
AuthName "Restricted Resource"
AuthUserFile /var/www/.htpasswd
Require valid-user
Require ip 192.168.1.2