How can I prevent indexing of site without "www"

Illicsbysleld

New Member
I read this thread and I have some additional questions for anyone that can help.http://www.ozzu.com/other-google-information-and-resources/how-can-prevent-indexing-site-without-www-t1485.htmlMy question is after using the following code on my site, anytime someone types in http://mysite.com it does actually work and go to http://www.mysite.com/ (I put my actual site name in the code)ErrorDocument 301Options +FollowSymLinksRewriteEngine on RewriteCond %{HTTP_HOST} ^mysite.com$ RewriteRule ^(.+) http://www.mysite.com/$1 [L,R=301]But the problem is in my error logs. This is what is the error says. I have changed the IP address to 0.0.0.0[Tue Oct 5 23:51:26 2004] [error] [client 0.0.0.0] Invalid error redirection directive: Does anyone know what the error could be?ThanksDeanTry changing your rewrite rule to:RewriteRule ^/(.*)$ http://www.mysite.com/$1 [L,R=301]Paste the code in the .htaccess file as it is. You do not have to change anything.Quote:Alien, are both those sites in your signature yours? Yes.I really like the PageRank site.
 
Back
Top