Forum Moderators: coopster

Message Too Old, No Replies

Need advice on major problem

         

dkin

5:31 pm on Sep 13, 2005 (gmt 0)

10+ Year Member



recently I had to change the urls of about 200 pages on my site, these pages were already indexed in google.

the old urls looks like this

games/xbox_games/gametitle.html

the new urls look like this

games/id/gameid/xbox_games/gametitle.html

now, does anyone have any suggestions on how to fix this problem? Ive tried a redirect but I get an error and I dont think there is any way I can even do a redirect without it affecting the rest of my page, obviously I cant redirect to the games new page because it wouldnt have the "id" so I am stuck, if anyone can help please do.

brokenbricks

5:42 pm on Sep 13, 2005 (gmt 0)

10+ Year Member



Why doesn't a 301 redirect work?

redirect 301 /games/xbox_games/gametitle.html [site.com...]

dkin

6:56 pm on Sep 13, 2005 (gmt 0)

10+ Year Member



thats my problem, I have to detect whether the user is trying to get to a games page then use the redirect if it is an old games page.

so I have to run something like this

if (!isset($id))
{
Redirect
}

But that redirects the loading of the main page as well seeing as I have created my pages using functions and switchs.

dkin

7:06 pm on Sep 13, 2005 (gmt 0)

10+ Year Member



got it the best I could, I used this code

if (isset($name) &&!isset($id)) {
header("Location: [site.com...]
}