Search Optimization
  Home arrow Search Optimization arrow Page 5 - Preparing Your New Site for Structural...
SEO Chat Forums  
Choosing Keywords  
Google Optimization  
Link Trading  
MSN Optimization  
Search Engine News  
Search Engine Spiders  
Search Optimization  
Web Directories  
Website Marketing  
Website Promotion  
Website Submission  
Yahoo Optimization  
SEO Tools
Adsense Calculator
AdSense Preview
Advanced Meta-Tags
Alexa Rank Tool
Check Server Headers
Class C Checker
Code to Text Ratio
CPM Calculator
Domain Age Check
Domain Typos
Future PageRank
Google Dance
Google Keywords
Google Search
Google Suggest
Google vs Yahoo
Indexed Pages
Keyword Cloud
Keyword Density
Keyword Difficulty
Keyword Optimizer
Keyword Position
Keyword Typos
Link Popularity
Link Price Calculator
Meta Analyzer
Meta Tag Generator
Multiple Link Popularity
Page Comparison
Page Size
PageRank Lookup
PageRank Search
Robots.txt Generator
ROI Calculator 
S.E. Comparison 
S.E. Keyword Position 
Site Link Analyzer 
Spider Simulator 
URL Redirect Check 
URL Rewriting 
Mobile Linux 
APP Generation ROI 
IBM® developerWorks 
SEO Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
SEARCH OPTIMIZATION

Preparing Your New Site for Structural Changes
By: Bill Sterzenbach
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 13
    2004-02-25

    Table of Contents:
  • Preparing Your New Site for Structural Changes
  • The Solution
  • Improper Redirect: Simple Redirection Header
  • Proper Redirect - Redirection with 301 Code
  • Moving Pages
  • The Code

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Preparing Your New Site for Structural Changes - Moving Pages


    (Page 5 of 6 )

    Now look at that first line in the above snippet from the exchange. The server is now instructing the browser or spider that the page has moved permanently to the new address. This allows the search engine to update its records regarding that particular file and begin spidering the new file.
     
    Our Database Table

    The database table is quite simple. We need only a couple of columns. In your version you may wish to add descriptions, notes, SE-friendly addresses, etc. but for this illustration we'll keep it as straight-forward as possible.

    RedirectContentID (auto number) OldURI NewURI
    1 /OldAddress.htm Content.php?ContentID=358
    2 /AboutUs.php Content.php?ContentID=234

    Using the Data

    In our table we have three columns - an ID column, a column for the old location of the file, and a column for the new location of the file. Please note that all paths are from the server root for portability. When we do our redirects we will prepend the server name to the location of the new content as the HTTP 1.1 spec calls for an absolute path (though many browsers accept relative paths).

    Pseudo-Code for 404.php

    Look at the name of the page that is being requested via the REQUEST_URI environment variable. This will contain the name of the page requested rather than the name of the 404 page currently running as Apache knows enough to understand that this variable will be critical to a 404 page.

    Attempt to find the name of the requested file in the database table.
    If the name is found:

    1. Set a header of 301 to tell the visitor or spider that this page has moved permanently.

    2. Set a location header to relocate the browser or spider to the address of the new page.

    If the name is NOT found (a REAL 404 condition)

    1. Display a search field with some search tips

    2. Display a feedback form to allow the customer to ask for assistance in finding their content

    At this point you may be saying "yes, yes, this is all very nice, where is the CODE??"

    More Search Optimization Articles
    More By Bill Sterzenbach


     

    SEARCH OPTIMIZATION ARTICLES

    - Implementing Six Sigma Methodology for SEO
    - Introducing Six Sigma Methodology for SEO
    - What is Mobile SEO?
    - Using Lynx for SEO Analysis
    - Mastering Lynx (Open Source Text Browser) fo...
    - More Blogging Tips: Cooking with Gas
    - Blogging Tips from Julie and Julia
    - SEO Essentials: the Proper Web Server and Pl...
    - Steps to Higher Rankings and Traffic
    - Building Linkable Pieces and Titles
    - Page Rank Sculpting
    - Page Rank Optimization
    - ClickTale Review
    - Final Issues: Moving Blogger to WordPress wi...
    - Avoid the Mistakes New SEOs Make



     



    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek