Forum Moderators: phranque

Message Too Old, No Replies

Major Site Revision Coming for me

How can I keep links from se's working?

         

wingslevel

3:00 pm on Oct 15, 2002 (gmt 0)

10+ Year Member



I have a fairly large dynamic (cold fusion) site. It's time for a major update and my stage site is getting close. The revisions will change the url string for all of my pages. This means that all of my se traffic will go away for a month or more unless I can figure out a way to parse the old url strings too.

I was thinking of trying to write a 404 error code that parsed out the old query and translated it into my new code.

Anybody had this problem in the past? Any other ideas?

Slade

3:07 pm on Oct 15, 2002 (gmt 0)

10+ Year Member



You're close. I'd say add an include at the beginning of your application.cfm.

In the included file, work out a method of converting your old urls to new ones. Then just do something like:


<cfheader statuscode="302" statustext="Object Moved">
<cfheader name="location" value="#new_page_url#">
<cfabort>

(I've not tested this on ColdFusion, but I've done similar in PHP. If it doesn't work for you, I can hack at it and see what happens.)

edit: 404 would be bad... It would tell the SE's that your pages no longer exist, which isn't exactly correct.

jdMorgan

3:18 pm on Oct 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



wingslevel,

You can do a 301-Moved Permanently external redirect on the server. This will inform the search engines that the pages have moved. In most cases, the SEs will update their database, and in Google's case, the PageRank is transferred to the new URL.

I said "most cases" above because some have reported problems using this technique. However, I have never had any problems doing it.

You also need to get any incoming links to your pages updated by asking the sites which link to you to update their links.

How you accomplish the 301 redirect depends on your server. On Apache, you can use mod_rewrite in httpd.conf or in .htaccess to do it. On IIS, there's an equivalent method, but you'll have ask someone else about it - I have no IIS experience.

Do a site search here on WebmasterWorld for "301 redirect" or "permanent redirect" for more info.

<added> Slade beat to it on the reply, but I strongly suggest a 301 redirect, not a 302. While a 302 does inform the SE that the page is moved, not deleted, it also implies that the page will return to the requested URL after being moved temporarily. Search engines may not updtate their URL if they expect the page to return to the original URL because of the 302-Moved Temporarily status code. I agree with Slade that a 404 is a bad idea - it means the page is probably gone for good, although a 410-Gone code would be more specific. </added>

HTH,

Jim