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
/file.html
тогда в .htaccess добавить строкуErrorDocument 403 /file.html
root /root/pages;
location = / {
alias /root/index.html;
}
location / {
}
RewriteCond %{REQUEST_URI} ^(.*/)index\.(php|html)
RewriteRule ^ https://site.name%1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*)$ https://site.name/$1 [R=301,L]