greetings all, i have multi sub-domain on my domainname.com , i need to redirect www.*.domainname.com to *.domainname.com
ex: http://www.sub1.domainname.com to http ://sub1.domainname.com
any ideas how to do so ?
greetings all, i have multi sub-domain on my domainname.com , i need to redirect www.*.domainname.com to *.domainname.com
ex: http://www.sub1.domainname.com to http ://sub1.domainname.com
any ideas how to do so ?
You can do it with mod_rewrite:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domainname.com$ [NC]
RewriteRule ^(.*)$ http://domainname.com/$1 [R=301,L]
Before using it, make sure you have enabled mod_rewrite first.