H
H
HappyCougar2015-07-17 12:46:31
htaccess
HappyCougar, 2015-07-17 12:46:31

What's wrong with this .htaccess rule?

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

Here is a rule, in theory, it should redirect from shop.simple.ru to simple.ru, but somehow it does not work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ShamblerR, 2015-07-17
@HappyCougar

That's it, give the whole .htaccess config
not taken into account only www
For now, you can try like this
RewriteRule . %1/%2 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question