Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: phranque
OK old man?
PS, we joined webmasterworld at about the same time, only you have been about 3 times as busy as me. Thanks for the reply!
Set up an account for www.site1.com.
Put this in it's .htaccess file:
Redirect permanent /site2 [site2.com...]
Done, you don't need anything else.
This method will also ensure that the bots understand that your site has moved. If you use a custom 404, the search engines will drop you!
Redirect permanent /site2 [site2.com...]
Then I uploaded it in ACSII next to my index.html on a test site of mine. What am I missing?
I image you have two URL's www.site1.com and www.site2.com.
Now i assume you've developed a new site, and stuck it on the first one as a subdirectory: www.site1.com/newsite.
Now you want www.site1.com to have it's own URL, www.site2.com.
To redirect the content, your .htaccess for www.site1.com for this example should be:
Redirect permanent /newsite [site2.com...]
This .htaccess file should go in the root of www.site1.com
Now when you type in www.site1.com/newsite in the address bar you should be redirected to www.site2.com.
If you type in www.site1.com you will go site1's index.com like usual.
This should be working, is your test set up correctly?
I hope you don't mind me jumping on this posting, but I have a similar problem so I thought it might be better if I tagged it on to this
Okay- the site I am working on is currently having a new design plus changes to the directory structure, therefore I need to know the best way to redirect the traffic.
The website is very busy therefore it is sat on a web cluster and load balancing is used to distrube the traffic.
The current website directory structure is for example
the new site will be
so I need to know the best way to redirect the current listings on the search engines to the new webpages and also make the robots index the new pages with out affecting the website ranking especially on Google, as we have a PR8.
Can you help? :-)
Please let me know
There has always been a site 1 with a real domain name. It was a business. But I had allot of extra space on the server to play and experiment with. So I started an entertainment ham radio site in a subdirectory of the site1.com. The ham site I added in the subdirectory we will call site 2. Site 2 was not a .com site, it only lived in the subdirectory of the site1.com. So here is what the URL structure looked like. www.site1.com/site2/
Site2 started out as just an experiment, but after a while, it started getting some heavy traffic. After about 11 months, site 2 had over 1000 pages and was receiving about 7,000 hits a week from search engines, sometimes more. This site also consumed to much space and I felt it was time to get it a real .com name and move it onto it's own server. So I did. I got a .com for it, and put it on its own hosting plan. I emailed the changes to all on the subscription list, and I had all the pages from the old site redirect to the new site by adding this in all the pages:
<META HTTP-EQUIV="Refresh" CONTENT="0; url=http://www.site2.com">
Also, the old site ranked very well and all pages were solid SHTML pages, and were designed to be optimized. Meta tags were well thought out, no spamming, the body was very relevant with key words and key fraises up top with no java covering it. The whole 9 yards. The forum was Iconboard and we used a news publishing CGI script to add the last 5 headlines to the index and build hundreds of articles in the news section of the site. The new site runs entirely in the CGI-BIN. The whole site is one big script. I have no idea if it will do well with the search engines or if they will even index it. So I have also added many of the old pages to the new site with links to the new site and a banner saying, this is the old site. Click here to go to the new site. Maybe these old pages will once again get indexed under their new URL, and get some traffic over to the main part of the site.
So now I must shut down the hosting plan for site1.com . But I can host the site1.com domain on my other server. And if I host site1.com and create a directory the same as it was, www.site1.com/site2/ , the search engine traffic will send it here. That's why I will use a custom 404 to grab the traffic that come to www.site1.com/site2/ , and redirect it to the new site.
For some introductory information about using mod_rewrite directives in the .htaccess file to rewrite URLs, see message #2 in this thread [webmasterworld.com].
For some information about using mod_alias directives in the .htaccess file to redirect URLs, see the Apache docs [httpd.apache.org].
Mod_alias is less powerful, but easier to use than mod_rewrite. In either case, be sure that the directives you use return a 301 (moved permanently) header with each redirect so the SEs know that they need to update your URLs.