RewriteEngine On
# Директива включает редиректы.
RewriteBase /
# Без директивы (.*) = /$1 будет /var/wwww/site/web/$1 с директивой = /$1
# Удалить www
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
# Проверяем, содержит ли домен www в начале URL.
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# Перенаправляем удаляем www
# https
RewriteCond %{HTTPS} off
# Проверяем наличие https в URL.
RewriteCond %{REQUEST_URI} !^/bitrix/admin/1c_exchange\.php$ [NC]
# Исключим обмен с 1С, ему требуется только 200
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Перенаправляем протокол на http.
https://site.ru:80
то пропишите место %{HTTP_HOST
} имя домена.RewriteCond %{REQUEST_URI} !^/bitrix/admin/1c_exchange\.php$ [NC]
можно удалить RewriteCond %{QUERY_STRING} (?:^|&)id\=раздел(?:$|&)
RewriteRule ^$ /? [L,R=301]
?
[L,R=301] v=spf1 ip4:IP-1 ip4:IP-2 ip4:IP-3 include:_spf.yandex.net ~all
RewriteCond %{REQUEST_URI} ^(.*)/index\.php$
# URL cодержит index.php в конце.
RewriteCond %{REQUEST_METHOD} =GET
# Выявляем GET запрос в URL (не POST).
RewriteRule ^(.*)$ %1/ [R=301,L]
# Удалить index.php из URL.
location /phpmyadmin/ {
deny all;
return 555;
root /usr/share/phpmyadmin/;
}
location /webmail/ {
rewrite ^/(.*)$ https://$http_host:8080/$1 permanent;
}
# letsencrypt
location /.well-known/acme-challenge/ {
alias /usr/local/ispconfig/interface/acme/;
default_type text/plain;
}
# default location
location / {
index index.php index.html index.htm;
proxy_pass http://127.0.0.1:82;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
RewriteCond %{QUERY_STRING} (?:^|&)t\=21(?:$|&)
RewriteRule ^mydomain\.com/thread\.php$ /mydomain.com/thread/21? [L,R=301]
index.php?route=%1
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/index.php$
RewriteRule ^(.*)$ /index.php [L]
?:
не учитывать эту группу не обязательное правило DirectoryIndex index.php index.html index.htm
$(curl ....)