PDA

View Full Version : 301 Redirect Question



Nico
05-22-2007, 05:51 PM
Hi,

Im going to change some of the URLs of the site in my sig, to more SE friendly ones. Specifically im going to change the www.famousdeaddb.com/list.php page to /list/

It's important than i change it to that, because i'll also be adding other pages inside the /list/ one, like /list/Presidents, etc.

But im not sure how to do it. Should i do a 301 redirect from "list.php" to "/list/" and then do another basic redirect from "/list/" to "list.php" ?


I know it's not the best thing to change the URLs names and im prepare to lose some traffic/Pagerank for a while. Any help would be appreciated!

Chris
05-22-2007, 06:02 PM
When you say "and then do another basic redirect" what do you mean? You go from one url to another then back? That makes no sense.

Just use mod_rewrite with 301s, that should work.

Nico
05-22-2007, 06:51 PM
That's what's confusing me...

By doing a 301 redirect im specifying that list.php is now /list/, but it will also mean that if someone types "/list/" they will go to list.php?

To clarify what im trying to do:
- If someone types "list.php", the URL should change to "/list/"
- The second one was not actually a Redirect, but a mod_rewrite rule saying that "/list/" is actually being processed by "list.php"

Chris
05-22-2007, 06:53 PM
you'll need to rename your functional list.php file to something else I think.

So, you create a 301 redirect from list.php to /list/ then you setup modrewrite to make /list/ actually list2.php which contains all the code... or use one of the other SE friendly URL methods (such as making "list" an actual file)

Nico
05-22-2007, 07:50 PM
Terrific Chris, thanks a lot for your help! I'll try that and see how it goes.