Redirect subdomain to subdomain on new domain

Posted by Ali on Stack Overflow See other posts from Stack Overflow or by Ali
Published on 2010-06-15T03:57:38Z Indexed on 2010/06/15 4:02 UTC
Read the original article Hit count: 395

Hello,

I own 2 domains sio-india.org and sio-india.com

What i want to do is redirect all the subdomains from 1st domain to 2nd domain. eg. home.sio-india.org to home.sio-india.com but i dont want to redirect sio-india.org to sio-india.com and also dont want to redirect www.sio-india.org to www.sio-india.com

Please help

I am using this code in htaccess but it is not working.

RewriteCond %{HTTP_HOST} ^(.*)sio-india\.org$ [NC]  
RewriteRule ^(.*)$ http://%1sio-india.com/$1 [R=301,L] 

Please hepl me I am stuck.

© Stack Overflow or respective owner

Redirect subdomain to subdomain on new domain

Posted by Ali on Server Fault See other posts from Server Fault or by Ali
Published on 2010-06-15T03:57:38Z Indexed on 2010/06/15 13:13 UTC
Read the original article Hit count: 395

Hello,

I own 2 domains sio-india.org and sio-india.com

What i want to do is redirect all the subdomains from 1st domain to 2nd domain. eg. home.sio-india.org to home.sio-india.com but i dont want to redirect sio-india.org to sio-india.com and also dont want to redirect www.sio-india.org to www.sio-india.com

Please help

I am using this code in htaccess but it is not working.

RewriteCond %{HTTP_HOST} ^(.*)sio-india\.org$ [NC]  
RewriteRule ^(.*)$ http://%1sio-india.com/$1 [R=301,L] 

Please hepl me I am stuck.

© Server Fault or respective owner

Related posts about .htaccess

Related posts about mod-rewrite