A
A
Azamat Ualkhanov2014-04-23 14:48:19
CMS
Azamat Ualkhanov, 2014-04-23 14:48:19

Why does the 301 redirect, gluing a domain in Imagecms not work?

There is a site on which Imagecms 4.6 is installed, in .htaccess I write a 301 redirect from tolstikovbros.kz to www.tolstikovbros.kz, but for some reason it does not work, I get the error "ERR_TOO_MANY_REDIRECTS".
Now I'm thinking, maybe the Imagecms engine is not working correctly, or am I writing the RewriteRule incorrectly?

RewriteCond %{HTTP_HOST} ^tolstikovbros.kz [NC] 
RewriteRule ^(.*)$ http://www.tolstikovbros.kz/$1 [L,R=301]

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2014-04-23
@Nc_Soft

Because www.tolstikovbros.kz fits under ^tolstikovbros.kz
In general, they usually do it with www. to without www redirect..
Do this ^tolstikovbros\.kz

B
Bogdan Odarchenko, 2014-04-23
@Neko3

from www to without

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.tolstikovbros.kz
RewriteRule ^(.*)$ http://tolstikovbros.kz/$1 [R=301,L]

with without on www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^tolstikovbros.kz
RewriteRule (.*) http://www.tolstikovbros.kz/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question