Answer the question
In order to leave comments, you need to log in
How to remove cyclic redirect in .htaccess?
Everything works fine locally. But as I put it on the VPS, it says that the cyclic redirection.
I don’t understand how it is possible to write code differently? I'm not going to prescribe each case from index.php in htaccess
RewriteEngine on
RewriteRule ^(\w+)$ index.php?page=$1 [L,NC,QSA]
RewriteRule ^(\w+)+\/$ index.php?page=$1 [L,NC,QSA]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
allow from all
Answer the question
In order to leave comments, you need to log in
RewriteRule ^ http%1://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] - what is this line for? because of it, in fact, there is a redirect.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question