Redirecting using 301 rule in .htaccess

Posted by user220755 on Stack Overflow See other posts from Stack Overflow or by user220755
Published on 2010-05-24T19:11:41Z Indexed on 2010/05/24 19:21 UTC
Read the original article Hit count: 257

Filed under:
|

I am having a problem with redirecting a page from example.com (to) www.example.com

The code I have is:

  RewriteEngine on

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

And it is not working, any help?

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about redirect