Hi,
My "challenge of the week" is to provide automated forwarding services to
URL's that return a "File not found" 404 error. This would act as a sort of
"switchboard" that, whenever a 404 error was encountered, a query would be
run against a database for the requested URL, and if there were a "new" URL
value for that originally requested page, the user would be redirected there
without ever seeing the actual 404 page.
Now, in theory, this is how it would work:
* Create a database table that holds the values for "old" URL's and the
"good" URL's that the old URL's should redirect to
* Create a custom 404 page that executes a query of this table each time
it's (the custom 404 page) executed. The logic would be something like
this...
- run query, querying for the "bad" URL value and returning the "good" URL
value
- If a value is returned,
+ do a cflocation to the new URL
- If a value is not returned
+ display the 404 page
So, here's the first problem I'm running into. I have the following set in
my application.cfm:
<cfapplication name="redirect_test">
<cferror type="request" template="404.cfm">
Yet, 404.cfm is not displayed; the standard IIS error page is displayed.
Also, it's documented that request error pages can't have any CF code in
them. Am I doing something wrong? Am I missing something? Is there any
way to accomplish what I need to do?
Thanks
Pete
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists