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:

fisicx

Moderator
Sep 12, 2006
47,054
9
15,559
Aldershot
www.aerin.co.uk
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

ImproveSearchListings

Free Member
Dec 5, 2006
704
35
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

fisicx

Moderator
Sep 12, 2006
47,054
9
15,559
Aldershot
www.aerin.co.uk
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

ImproveSearchListings

Free Member
Dec 5, 2006
704
35
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

fisicx

Moderator
Sep 12, 2006
47,054
9
15,559
Aldershot
www.aerin.co.uk
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

edmondscommerce

Free Member
Nov 11, 2008
3,651
628
UK
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

Chris Power

Free Member
May 27, 2009
51
10
Edgware
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

Join UK Business Forums for free business advice