K
K
kass77642018-08-15 09:12:47
htaccess
kass7764, 2018-08-15 09:12:47

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:

spoiler

194.58.123.60 - - [14/Aug/2018:17:46:16 +0300] site.ru GET /index.php?set=true HTTP/1.1 499 0 "site.ru" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36" "91.232.188.5, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,
91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,
91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,
91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,
91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,
91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,
91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,
91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,
91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,
91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,
91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,
91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60, 91.232.188.5, 194.58.123.60,

.htaccess subdomain:
RewriteEngine on
RewriteRule ^(.+) http://site.ru/$1 [P]

.htaccess of the main site:
# Используем 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]

Tell me, what could be the reason?
Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question