NYCPHP Meetup

NYPHP.org

[nycphp-talk] [OT] migrating old site to cleaner URLs

Brent Baisley brenttech at gmail.com
Wed Jun 27 10:13:10 EDT 2007


You probably want to look into Apache mod_rewrite, if you are running  
Apache. It will do exactly what you are looking for.

The alternative is to put a php file in all of the "old" locations  
that is really just a single include line that loads the file from  
the new location you want to move to.


On Jun 27, 2007, at 4:43 AM, Marc Antony Vose wrote:

> Hi there:
>
> I have an old site that has been online for ~7 years, and it is  
> established, if a bit old and crusty.  It's a database-driven  
> directory of products for the Mac, and it performs reasonably well  
> in google's search results, and gets a fair amount of traffic.
>
> This site was built before I even had a framework, so it's all  
> cobbled together, and I'm just now finally building it out to what  
> I always wanted it to be, while simultaneously moving it to my clean 
> (er) framework. So, the question is this...
>
> My URLs are all something like www.xyz.com/trigger/0/1/4.  I think  
> at the time I just wanted them to be short.
>
> Now that I'm rebuilding it, I have different needs, because the  
> site will be structured a bit differently in order to list products  
> for more platforms. I would like to have www.xyz.com/product/1234/ 
> platform/567.  Still short, but makes more sense.
>
> Thing is, the site does receive a great deal of its traffic from  
> google, and who knows how many bazillion links there are pointing  
> to various pieces of the site, so I need to implement an  
> intelligent way to parse the old URLs into the new ones.
>
> But that's not the hard part; the part I am worried about is losing  
> the search weighting I've built up over the years.  I've read that  
> google ignores 302 redirection codes and doesn't update its index,  
> so I'm a bit at a loss as how to proceed.
>
> Anyway, wondering if someone could give me advice or share a real- 
> world example of what they have done in the past.
>
> Cheers,
>
> Marc Vose
> http://www.suzerain.com
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php




More information about the talk mailing list