AllowOverride All
в настройках VirtualHost.RewriteRule ^(.*)$ /index.php?action=$1 [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php?action=$1 [QSA,L]
RewriteCond %{HTTP_HOST} ^(?:www\.)?domain\.ru$ [NC]
RewriteRule ^(spb|msk|rostov)/(.*) http://$1.domain.ru/$2 [R=301,L]
RewriteCond %{HTTP_HOST} ^(?:www\.)?domain\.ru$ [NC]
RewriteCond %{REQUEST_URI} ^/(msk)/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/(spb)/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/(rostov)/(.*)$
RewriteRule ^ http://%1.domain.ru/%2 [R=301,L]
%{ENV:AVIF_CUSTOM_PATH}
%{ENV:variable}, where variable can be any environment variable, is also available. This is looked-up via internal Apache httpd structures and (if not found there) via getenv() from the Apache httpd server process.
RewriteEngine On
# префикс пути для avif-версий: /1.jpg -> /avif/1.jpg.avif
RewriteRule .* - [ENV=AVIF_CUSTOM_PATH:/avif]
# дебаг - заголовок отдастся, путь будет показан
Header set x-avif-custom-path %{AVIF_CUSTOM_PATH}e
# проверяю наличие и отдаю, если есть
RewriteCond %{DOCUMENT_ROOT}%{ENV:AVIF_CUSTOM_PATH}/$0.avif -f
RewriteRule ^.*\.(?:jpe?g|png)$ %{ENV:AVIF_CUSTOM_PATH}/$0.avif [NC,T=image/avif,L]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond &%{QUERY_STRING} ^(?=.*&w=(\d+))(?=.*&h=(\d+))
RewriteCond %{DOCUMENT_ROOT}/resized/$1_%1_%2.$2 -f
RewriteRule ^(original/.+)\.(.+) /resized/$1_%1_%2.$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /resizer.php?path=$1 [L,QSA]
</IfModule>
RewriteRule ^results/$ /results.php [L]
rewrite ^/results/$ /results.php last;
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)\.xml$ $1.html [L]
RewriteRule "^articles/ (текст вначале списка продукции)/$" /articles/ [R=301,NC,L] RewriteRule ^articles/\ (текст\ вначале\ списка\ продукции)/$" /articles/ [R=301,NC,L]
RewriteRule "^articles/ \(текст вначале списка продукции\)/$" /articles/ [R=301,L]
RewriteRule ^articles/\ \(текст\ вначале\ списка\ продукции\)/$ /articles/ [R=301,L]
RewriteRule ^articles/%20%28%D1%82%D0%B5%D0%BA%D1%81%D1%82%20%D0%B2%D0%BD%D0%B0%D1%87%D0%B0%D0%BB%D0%B5%20%D1%81%D0%BF%D0%B8%D1%81%D0%BA%D0%B0%20%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%86%D0%B8%D0%B8%29/$ /articles/ [R=301,NC,L]
RewriteCond %{THE_REQUEST} "^\S+ /articles/%20\(%D1%82%D0%B5%D0%BA%D1%81%D1%82%20%D0%B2%D0%BD%D0%B0%D1%87%D0%B0%D0%BB%D0%B5%20%D1%81%D0%BF%D0%B8%D1%81%D0%BA%D0%B0%20%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%86%D0%B8%D0%B8\)/[ ?]"
RewriteRule ^ /articles/ [R=301,L]
AuthName "Please enter your credentials. Website is available only to authorized users."
AuthType Basic
AuthUserFile /var/www/html/master/.htpasswd
<RequireAny>
Require valid-user
Require expr %{THE_REQUEST}=~m#^\S+\s/api#
</RequireAny>
AuthName "Please enter your credentials. Website is available only to authorized users."
AuthType Basic
AuthUserFile /var/www/html/master/.htpasswd
Require valid-user
Satisfy Any
SetEnvIf Request_URI ^/api api_allow=1
Order Allow,Deny
Allow from env=api_allow
Allow from env=redirect_api_allow
RewriteRule ^articles/\xAA\xDD/$ /articles/ [L,R=301]
RewriteRule ^articles/.*[^\s\w/] /articles/ [L,R=301]
location / {
proxy_pass http://backend;
}
location ~ ^/(smokeping|pgadmin4) {
allow 192.168.11.0/25;
deny all;
proxy_pass http://backend;
}
RewriteCond %{QUERY_STRING} ^(\d+)([A-Z]+)$
RewriteRule ^$ /?course=%1&utm_source=sms&utm_term=%2 [R=301,L]
SetEnvIf User-Agent ^(.{0,8}) VarName=$1
%{VarName}e
Options -Indexes
ErrorDocument 404 /404.php
<IfModule mod_php5.c>
php_flag allow_call_time_pass_reference 1
php_flag session.use_trans_sid off
#php_value display_errors 1
#php_value mbstring.internal_encoding UTF-8
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} \.(gif|jpe?g|png|ico|webp)$
RewriteRule ^(.*)$ https://site.ru/$1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php index.html
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/jpeg "access plus 3 day"
ExpiresByType image/gif "access plus 3 day"
</IfModule>