I hope anyone ehre can help me out with a little problem I have. I need a .htaccess code that redirects www pages to non www pages. Here's what I have:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule ^(.*)$ http://$1\.domain.com [L,R=301]
The code works, my only problem about it is that www.subdomain.domain.com doesn't work. www.domain.com/subdomain works just fine. I really need www.subdomain.domain.com working though, I hope anyone here could help me out here.
Question
Kyo
Hey everyone,
I hope anyone ehre can help me out with a little problem I have. I need a .htaccess code that redirects www pages to non www pages. Here's what I have:
The code works, my only problem about it is that www.subdomain.domain.com doesn't work. www.domain.com/subdomain works just fine. I really need www.subdomain.domain.com working though, I hope anyone here could help me out here.
Thanks in advance,
Kyo
Edited by KyoLink to comment
Share on other sites
7 answers to this question
Recommended Posts