[thelist] 301 redirection mess -- two wholesale site-URL-structure changes within 8 months

Gersten, John JGERSTEN at lchb.com
Mon Apr 4 19:35:23 CDT 2011


Extremely helpful -- and of course, extremely simple <grin>. Got lost amidst the trees again. I'll change the original 301s to the newest URLs, and then add a new set for the updated "numeric" pages.



-----Original Message-----
From: thelist-bounces at lists.evolt.org on behalf of Phil Turmel
Sent: Mon 4/4/11 17:04
To: thelist at lists.evolt.org
Subject: Re: [thelist] 301 redirection mess -- two wholesale site-URL-structure changes within 8 months
Hi John,

On 04/04/2011 11:35 AM, Gersten, John wrote:
> In September 2010, we replaced our static html site with a dynamic php-based site. The site URLs changed from things like "../page-name.htm" to "../cases.php?CaseID=123" and we facilitated this conversion by stuffing our .htaccess file with several hundred 301 redirects. All well and good, and the conversion went smoothly.
> Cut forward 8 months, and now we are switching to a new dynamic URL approach -- instead of the less-than-optimal string of text and numbers, we've moving to a system where "../cases.php?CaseID=123" becomes "../case/123/page-name".

Good plan, IMHO.

> Any ideas on how to handle the .htaccess 301 redirects for the new update? My big concern relates to leaving the "old" 301 redirects in place. Google and related discussion indicates that such 301 redirects should be left in place permanently, but wouldn't leaving them in mean that the browser gets bounced around inside .htaccess twice before getting served their URL? That seems somehow wrong to me.
> Example: visitor seeks "../page-name.htm" from a pre-September URL. They hit our server, which first redirects the request to "../cases.php?CaseID=123", but then since that page no longer exists, the .htaccess file then takes the request for "../cases.php?CaseID=123" and 301-redirects it to "../case/123/page-name" -- or have I got the wrong end of the stick here?
> We need to accommodate redirection from the old, pre-September URLs as well as the more recent redirections from the numerical system to the "English-language-URLs" approach.
> I realize this is confusing, and I apologize if my explanation only makes things more so. Essentially, I want to be able to have the server properly process URL requests for both the set of pre-September URLs as well as the more recent set of September-April URLs, but can't figure out the best/logical way to do so.

The permanence referred to is not the redirect itself, but the original URL.  The oldest URLs can certainly be redirected in one step to the new URLs.  The goal is for any URL ever published on your site to be reachable at its new address, whatever that might be.  How you accomplish that in your server is an implementation detail.

> Thanks in advance; any ideas/info will be greatly appreciated.
> John



* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt ! 

This message is intended for the named recipients only.  It may contain information protected by the attorney-client or work-product privilege.  If you have received this email in error, please notify the sender immediately by replying to this email.  Please do not disclose this message to anyone and delete the message and any attachments. Thank you.

More information about the thelist mailing list