NYCPHP Meetup

NYPHP.org

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

Jon Baer jonbaer at jonbaer.com
Wed Jun 27 11:32:52 EDT 2007


There is a script out there which will run through your 404 apache  
log + put it into mod_rewrite recipes automatically, if I can dig up  
will post but Im sure it might also be trivial to write.  I used this  
to clean up a switch over a few years back.

- Jon

On Jun 27, 2007, at 10:13 AM, Brent Baisley wrote:

> 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
>
> _______________________________________________
> 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