Hi, I have installed a directory on sub-domain of my site. YahooFanClub. So the directory url is: dir.mydomainname.com now the problem is Google is indexing pages from mydomainname.com/dir is there a way to stop it. I mean anyway I can redirect anything that goes to mydomainname.com/dir to dir.mydomainame.com ... Please help me its really annoying. Thanx in advance.
Try adding this to your HTaccess file; Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^www.domain.com/dir [nc] rewriterule ^(.*)$ http://dir.domain.com/$1 [r=301,nc] Hopefully it'll work for you
Yes there is a directory in there. So terryuk ... all I need to do is replace domain.com with my site address: www.yahoofanclub.com coz I am a little dumb in Rewrite rules. also tell me if I put this code in root .htaccess file or in the /dir .htaccess file ?? Thanx again man
Replace the domain.com with your domain of course, and try uploading it to the root of your account.. that was only a suggestion.. if it doesn't work take it out and forget i ever said anything lol
This is really important. Google is crawling wrong pages each day please help me out I dont know why Mods gave me infraction for this bumping .... I really need help.