Updating web pages

ImproveSearchListings

Free Member
Dec 5, 2006
704
35
Hi All,

Over time, the site has been built up & up, without any planning - resluting in the structure being incredibly messy and quite confusing.

I'd like to restructure the entire website adhering to a coherent plan - I'm concerned however that anyone who has a bookmark to a certain page etc will not be able to find it. On top of that, I don't want to do any search engine result damage.

Would you suggest a redirect, or something different?

Thanks

edit: This is not the site in my signature/profile.
 
Last edited:
Redirects are the only real solution. If you keep the same file names then all you need to do is redirects at a directory level wehich should make things a little easier.
 
Upvote 0
As above redirects are the best way to go, that way any external bookmarks will not get the "Page Not Found Error"
 
Upvote 0
Not sure the filenames will be the same or not at this moment in time.

I was thinking that a lot of the pages will change entirely. Rather than lead the bookmarks and search engines to nothing - I could at least transfer them to a similar/relevant page.

When you say at a directory level - does that mean I don't need to do an 301 or anything similar?
 
Upvote 0
Sounds like the best option will be to stop what you're doing, rebuild using a CMS and 301 redirect any old URLs.
 
Upvote 0
Yes you will still need to 301 everything but it just means you do

olddirectory > newdirectory

rather than

olddirectory/file1.htm > newdirectory/file1.htm
olddirectory/file2.htm > newdirectory/file2.htm
olddirectory/file3.htm > newdirectory/file3.htm


and so on
 
Upvote 0
Sounds like that'll save me an awful lot of time fisicx.

That'll only work if I change them to the same name in a different directory won't it?

I have a feeling I'm going to have to look at pointandstare's suggestion instead - rather now than in a years time when there'll be even more there.......
 
Upvote 0
Out of interest, will we retain SE positions for all the old pages?

My new concern is that by setting up 301 redirects the SEO work done will have been wasted.
 
Upvote 0
I think as long as the content stays mostly the same, search engines will interpret the redirect as "page moved" and will update the results to point to that page instead, and keep that page at the ranking of the previous page.
 
Upvote 0
Yes, that's the whole point of the 301 - it's a message that a page has permanently moved.

When you do do the redirects though just remember to do the reorg before you start fiddling with the page contents. Google doesn't mind you moving a page but if you change the contents then you can easliy lose your ranking.

And don't move the pages, copy them into the new folders before you write the 301's so that the old pages don't get lost before all the name servers have updated. After a couple of days you can take the old pages down.
 
Last edited:
Upvote 0
If your filenames / request URLs are meaningful, you can use the following PHP snippet to handle the 301 (assuming there is a search functionality on the CMS you move to.)

(This has been taken out of another script but you should get the idea)

PHP:
<?php

$location = false;
$redirect = '302 Found';
//$redirect = '301 Moved Permanenlty';
$base_location = 'http://yourdomain.com/';


$req = $_SERVER['REQUEST_URI'];
$exp = explode('/', $req);
$lastbit = array_pop($exp);
if(empty($lastbit)){
    $lastbit=array_pop($exp);
}
$exp2 = explode('.', $lastbit);
$lb2 = $exp2[0];
$req = mysql_real_escape_string($lb2);

//do some other queries here to try to find the exact right page..

//.. if nothing, redirect to the search results page

if(empty($location)){
    //Redirect to Search Results Page
    $location = 'search_result/?q=' . urlencode(str_replace('-', ' ', $req));
}



if(!empty($location)){
    header($redirect);
    header('Location: ' . $base_location . $location);
    die;
}
?>
 
Last edited:
Upvote 0
What we do is set up the new structure with the new content, all in new pages. Then disable all the links to the old content, but leave the old content where it is. Over time, interest in the old pages will fade away and, eventually, you’ll be able to delete it. We call it decommissioning.
 
Upvote 0

Latest Articles