Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> GT - Next Gen and Standard
Author Message
dean
Worker
Worker



Joined: Apr 14, 2004
Posts: 193

PostPosted: Fri Oct 01, 2004 10:21 pm Reply with quote

A couple of months ago, I moved my main site to a new directory while upgrading from phpnuke 6.5 - 7.3. Old site had GT NextGen 0.4a installed and had googlebots crawling every day. They vanished for some reason and after searching Google I found:

Quote:
If we continue to list an 'old' version of your site (i.e. we continue to list [ Only registered users can see links on this board! Get registered or login! ] despite the fact that your site now lives at [ Only registered users can see links on this board! Get registered or login! ] ) you need to update the links that are pointing to the sites. Since our robots jump from page to page via hyperlinks, someone must still be linking to the defunct page. Once others correct their links, we can too. Once your new site is live, you may wish to place a permanent redirect (using a "301" code in HTTP headers) on your old site to inform visitors and search engines that your site has moved.

One way to determine who is linking to the dead site is to try a link search. You can find instructions on how to do this on our features page. Please note that this process does not work for all of the sites in our index.



Well, I had redirected the main page to the new URL but after a search of Google, looking for listed URLS from the old site, I found over 100 indexed using this google search device: http://www.google.co.uk/help/features.html#link

Since there was no way, I was going to spend the time individually redirecting each of those pages, I looked for a way to doing it systematically. I found this page http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm where after reading a bit I found that I could place an .htaccess file in the main directory of the old location with only one redirect that would do the job:

Code:
RewriteEngine On


RewriteRule ^(.*)$ http://www.new.com/$1 [R=301,L]



Voila, my old site was remapped to the new with only two lines of code. I checked a number of the old URLS just to see and they all marvelously were redirected to their proper location on my new site.

One day later, either by coincidence or hopefully through this process, Google returned to my site Smile
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Fri Oct 01, 2004 10:26 pm Reply with quote

What a great "How To"! Thanks for sharing this Dean!
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> GT - Next Gen and Standard

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©