Hello,
We made a major structure change to our web site. Our server allows us to create custom error pages instead of the standard 404 page not found, etc. Anyway, is it possible to create some sort of PHP (or other language) page that can capture the incorrect URL. If so, I could check it agains a database and redirect the user to the new page. Is this even possible?
Thanks
mswansonpcs
PHP To catch incorrect URL
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
-
mswansonpcs
- Forum Newbie
- Posts: 2
- Joined: Wed Jul 13, 2005 6:05 am
Hmm.
Interesting, I've been reading about this but i'm not sure its what i'm looking for.
What I have is a huge site, which before the changes was approx 2500 html pages. I have made several changes using php and database connectivity to reduce these pages. What i essentially want to do is this:
A user goes to mysite.com/123/ghda/dhfd/dfj/sjj/djf/index.htm
The page does not exist so instead of a 404 not found, a custom php page is shown.
The php page takes the requested URL, connects to a lookup table in the database. If the page used to exist, then it is bounced to the new location. If not, a simple error message is shown.
What i don't know how to do is capture that URL that was originally intended short of leaving empty redirect pages in every location where a page used to exist...
Does this make it any more clear, thanks...
What I have is a huge site, which before the changes was approx 2500 html pages. I have made several changes using php and database connectivity to reduce these pages. What i essentially want to do is this:
A user goes to mysite.com/123/ghda/dhfd/dfj/sjj/djf/index.htm
The page does not exist so instead of a 404 not found, a custom php page is shown.
The php page takes the requested URL, connects to a lookup table in the database. If the page used to exist, then it is bounced to the new location. If not, a simple error message is shown.
What i don't know how to do is capture that URL that was originally intended short of leaving empty redirect pages in every location where a page used to exist...
Does this make it any more clear, thanks...