S
S
Snatch082020-03-02 04:38:01
htaccess
Snatch08, 2020-03-02 04:38:01

How to fix .htaccess redirect issue?

at the root of the site is .htaccess with RewriteEngine onThere is a subsection of the mobile version and it also contains .htaccess RewriteEngine on

Could this be the cause of the error "ERR_TOO_MANY_REDIRECTS The site redirected too many times" ??

At the root of the site is this .htaccess

php_value max_execution_time 500
php_value max_input_time 500
php_value upload_max_filesize 30M
php_value post_max_size 30M

RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ router.php/$1

#Редирект всех страниц с HTTP на HTTPS
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

#Запрет просмотра папки
Options -Indexes

#Кодировка js-файлов
AddCharset utf-8 .js


And in the subdirectory with the mobile version ( https://site.ru/m/) such .htaccess
php_value max_execution_time 500
php_value max_input_time 500
php_value upload_max_filesize 30M
php_value post_max_size 30M

RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ router.php/$1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-03-02
@shambler81

no, this is not because of this, most likely the error is due to the https redirect,
and there is an error in it due to the nginx + apache configuration error (all mans on the Internet have this error)
how to check
https://bertal.ru/
upload your url and see what right in the loop

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question