Hello, can anybody tell me how can I redirect http://www.subdomain.domain.com to http://subdomain.domain.com using htaccess ? Thanks!
You should use a 301 redirect.. Just add this to your .htaccess file: Redirect permanent http://www.subdomain.domain.com http://subdomain.domain.com that should do the trick
Use this instead, if you want all URLs in http://www.subdomain.domain.com to go to the corresponding URL at http://subdomain.domain.com <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.subdomain\.domain\.com [NC] RewriteRule ^(.*) http://subdomain.domain.com/$1 [L,R=301] </IfModule> Code (markup):
oops, i thought you only wanted one subdomain redirected. like exam said if you want em all his code is the way to go.