marcus-miller
15-08-2002, 12:14/12:14PM
Hi all,
a question for the techies here... :)
I have redesigned one of our sites, gone from huge static site to nice database driven dynamic site. The old site probs had about 300-400 pages.
This site handles all of that with 3 pages, some nice .php to disect the links and query the database and a little help from mod_rewrite.
old - www.mobilefun.co.uk
new - www.mobilefun.co.uk/index-mk4
I did a similar thing to one of our other sites earlier in the year. To help our users, I added a 404 handler page that asked the visitor to visit the new homepage.
While on the surface this seemed fine-n-dandy, bad things were happening!
- Every 404 generated resulted in a version of this page being served.
- Every missing page generates a 404
- Every missing image from the missing pages generates a 404
- The page contained about 30+ images, so for each failed page request from google or someones favs 30 versions of our new <bandwidth intensive> page was served.
- I noticed this on the stats after a week or so but it still resulted in one almighty bill from the company hosting our box.
- As not to lose visitors, most of which come from google I have a new 404 page but I would like to distinguish between requests for graphics and requests for pages.
( serve the 404 page when a page is requested, serve an empty page if 404 generated by an image )
What I want to know is:
how can I retain the url for the requested page to play with it with php to determine what to return with the 404 page???
any takers.. :confused:
Thanks freinds
Marcus
( i have just realised this may be a bit off-topic, I will understand if it is not replied to or removed )
a question for the techies here... :)
I have redesigned one of our sites, gone from huge static site to nice database driven dynamic site. The old site probs had about 300-400 pages.
This site handles all of that with 3 pages, some nice .php to disect the links and query the database and a little help from mod_rewrite.
old - www.mobilefun.co.uk
new - www.mobilefun.co.uk/index-mk4
I did a similar thing to one of our other sites earlier in the year. To help our users, I added a 404 handler page that asked the visitor to visit the new homepage.
While on the surface this seemed fine-n-dandy, bad things were happening!
- Every 404 generated resulted in a version of this page being served.
- Every missing page generates a 404
- Every missing image from the missing pages generates a 404
- The page contained about 30+ images, so for each failed page request from google or someones favs 30 versions of our new <bandwidth intensive> page was served.
- I noticed this on the stats after a week or so but it still resulted in one almighty bill from the company hosting our box.
- As not to lose visitors, most of which come from google I have a new 404 page but I would like to distinguish between requests for graphics and requests for pages.
( serve the 404 page when a page is requested, serve an empty page if 404 generated by an image )
What I want to know is:
how can I retain the url for the requested page to play with it with php to determine what to return with the 404 page???
any takers.. :confused:
Thanks freinds
Marcus
( i have just realised this may be a bit off-topic, I will understand if it is not replied to or removed )