V
V
Valeri Lavrov2016-06-06 16:24:23
PHP
Valeri Lavrov, 2016-06-06 16:24:23

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

1 answer(s)
D
devian3000, 2016-06-07
@Ablovka

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 question

Ask a Question

731 491 924 answers to any question