|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Intercepting a URL
I am running a CF site hosted by a third party. I am wanting to "intercept" a request for page so that I can check for an entry in a database for the "page" prior to the user being directed to a 404 error page.
For example, a user might request "<domainname.com>/fff" or "<domainname.com>/aaa.cfm". Those pages do not exist at <domainname>. I would like to capture the "/fff" or the "aaa.cfm" and do a look up a database. If an entry exists, I would like to do something with the result. Is anybody able to point me in the right direction to capture this data please? Keep the faith |
|
#2
|
|||
|
|||
|
You can place code in the Application.cfm or Application.cfc file that will look at the URL or the requested file name, perform some lookup in the database, and then do any other execution or redirecting you want. You should be able to use cfheader to generate a 404 error from within CF.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Intercepting a URL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|