L
L
Leopandro2021-05-29 17:09:05
htaccess
Leopandro, 2021-05-29 17:09:05

Why writes ERR_TOO_MANY_REDIRECTS?

htaccess like this:

Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "*"
Header set Access-Control-Allow-Methods "*"
RewriteEngine on

# Force https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteCond %{REQUEST_URI} !\.(?:css|js|jpe?g|gif|png|tff)$ [NC]
RewriteRule ^(.*) /index.html [NC,L]

the main thing goes from http to https, but the redirect does not stop there

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