Redirecting the whole site?

jsurya

Regular Member
Oct 7, 2008
438
916
I am redirecting (using meta refresh) one of my site to another site and my problem is only the homepage is redirecting and not the whole site..

for ex. I am redirecting 123.com to abc.com and if I type 123.com it redirects to abc.com, but for 123.com/pages.html it goes to same page, but I want that page also redirect to abc.com how can I do that?
 
christ! redirection is VERY blackhat, not knowing is even better, and not using google is the best!

Code:
http://www.webweaver.nu/html-tips/web-redirection.shtml
 
Snowwhite, thanks for the link. I checked on that page and used a 301 redirect, now its not redirecting the correct way..

I need to redirect all of the pages like
123.com
123.com/a.html
123.com/b.html
123.com/c.html

to only this page...

abc.com

when I used the 301 redirect now it goes

123.com/a.html --> abc.com/a.html
123.com/b.html --> abc.com/b.html
123.com/c.html --> abc.com/c.html

I do not want in this way, all my pages have to redirect to the new site homepage only. I cannot find htaccess code on that site.

Yet, I need rectify this..
 
htaccess rewrite should do it, something along the lines of:

Code:
RedirectMatch permanent /.* http://www.newdomain.com/

If you don't already have a .htaccess file just create it and dump it in the webdoc directory of your site.
 
hmm not a good way to do that, you're better just redirecting google traffic

That way you get the PR but the pages are still readable

Code:
Options +Followsymlinks
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Googlebot
RewriteRule ^(.*)$ http://www.abc.com/ [R=301,L]

All the site will auto redirect google to abc

after a while you'll have the PR but but in the mean time you can still have whatever content you want for normal peeps
 
Last edited:
if i do

Code:
Options +Followsymlinks
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Googlebot
RewriteRule ^(.*)$ hxxp://www*abc*com/ [R=301,L]

does google know its being redirected?
 
There are other fun things you can do with 301's, php can even redirect using the header function.

You have to be careful though, and not have a chain of such redirects, as that really can make your SERP listings stand out as spammy or odd and needing human inspection.
 
Although it seems you worked it out now. The easiest way if you just want the user moved on and dont care about search engines etc is to create just a custom 404 page that redirects. Then delete all files for that site. Then it redirects all of them back to whatever new homepage you want.
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock