Answer the question
In order to leave comments, you need to log in
How to eliminate double sour?
Hello!
There is a site with subdomains. There are essentially no files on subdomains, there is only .htaccess with proxying to the main site. The content on subdomains and the main site is different and navigation occurs both on subdomains and on the main site. Since recently (although nothing has changed), subdomains have refused to work (504 error). According to the provider, there is a loop due to double proxying.
Log:
RewriteEngine on
RewriteRule ^(.+) http://site.ru/$1 [P]
# Используем UTF-8 кодировку для всех переданных text/plain или text/html
# Принудительно выставляем UTF-8 для некоторых форматов
#AddCharset utf-8 .css .js .json .rss .xml
# Блокировка возможности просматривать директории.
#Options -Indexes
#<FilesMatch ".(htaccess|htpasswd|bak|ini|log|sh|inc|config|sql|psd|fla|ai)$">
#Order Allow,Deny
#Deny from all
#</FilesMatch>
RewriteEngine On
# Блокируем возможность посылать base64_encode через URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Блокируем передачу тега <script> через URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Блокируем выставление переменной PHP GLOBALS через URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Блокируем возможность изменять переменную _REQUEST через URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Посылаем все заблокированные запросы на домашнюю страницу с ошибкой 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#Всё остальное на index.php
RewriteCond %{REQUEST_FILENAME} !^favicon\.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,QSA]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question