D
D
Dmitry Baskakov2018-07-13 07:42:59
Apache HTTP Server
Dmitry Baskakov, 2018-07-13 07:42:59

ERR_TOO_MANY_REDIRECTS htaccess on apache. How to fix?

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} (.*)
RewriteCond %{REQUEST_URI} /$ [NC]
RewriteRule ^(.*)(/)$ $1 [L,R=301]

When going to localhost:81/news/?id=123 goes to localhost:81/news?id=123
and throws an error ERR_TOO_MANY_REDIRECTS

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2018-07-13
@VladimirAndreev

because the regular expression .* matches any url

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question