...

View Full Version : Redirect Website



Tony M
02-24-2011, 04:35 PM
My website can be accessed from different URLs and IPs. For Example it can be accessed by:
mirror1.com/~mysite/
mirror2.com/~mysite/
123.123.123.123/~mysite/
mirror3.com/~mysite/

And (for an Unknown reason) My website can be accessed from many different URLs (and some that I do not even know their URLs)
Search engines begins to crawl some different url versions of My site, and begins to Ban My site....

BUT My main website that I want users to visit is: www.example.com

So My question is:
I want to redirect 301 (by using .htaccess) all requests from http://all-urls-and-ips/~mysite/ to http://www.example.com/ (that is My site). So how can I do this?

Any Suggestions Will Be Helpful :thumbsup:

abduraooft
02-25-2011, 09:54 AM
Try
RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum