Hello. I have the following domain: inichat.com I would like all requests to www.inichat.com or inichat.com to be redirected to tr.inichat.com If possible I would also like the search engines to "pick up" the site with that address "tr.inichat.com" kind of like del.icio.us How can I do this? Thanks.
Add the following to your .htaccess file in the root directory of your website: Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^inichat\.com RewriteRule ^(.*)$ http://tr.inichat.com/$1 [R=permanent,L] RewriteCond %{HTTP_HOST} ^www.inichat\.com RewriteRule ^(.*)$ http://tr.inichat.com/$1 [R=permanent,L] Code (markup): This is a 301 redirect, so the search engines will pick up on the fact that this is the new domain, and the old one shouldn't be used any longer.
Thanks for your response. Unfortunately I can't get it work as I wanted it to. Here's the thing. I'm hosting on Godaddy and I have the option to have more than one domain on the same account. inichat.com is actually in a folder(chat) on triniwiki.com tr.inichat.com is another folder(trinichat) on triniwiki.com When I tried the .htaccess on the folder containing inichat.com it didn't redirect. When I tried it in the .htaccess in the root of triniwiki.com it didn't redirect to tr.inichat.com but it redirected to tr.inichat.com/chat (triniwiki.com/trinichat/chat) which is an existing folder. I hope this isn't confusing. Can you tell me what I need to do for it to work in this situation? Thanks.
Well I just wanted to say that this worked. Apparently I just had to wait for it to kick in on Godaddy.