Hi @markaspirenet,
In IIS, you can set a custom 404 error page to point to your ColdFusion page. Please open IIS Manager and select your website, then open the "Error Pages" module, find the 404 status code and double-click to open it, and in the "Response Action" section, do one of the following:
- Select Insert content from static file into the error response to serve static content, for example, an .html file, for the custom error.
- Select Execute a URL on this site to serve dynamic content, for example, an .asp file for the custom error.
- Select Respond with a 302 redirect to redirect client browsers to a different URL that contains the custom error file.
In the File path text box, type the path of the custom error page if you chose Insert content from static file into the error response or the URL of the custom error page if you use either the Execute a URL on this site or Respond with a 302 redirect, and then click OK.
What you need to do is enter the URL of the ColdFusion page you want to redirect users to in the "Redirect to" field.
But for what you said, "Include the original URL in the redirected link", my understanding is to pass back the original value of HTTP_REFERER
as a query string parameter for 301/302. If that's the case, you probably need a custom ASP to do the actual redirection, using Response.Redirect()
instead of relying on built-in IIS functionality.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.
Best regards,
Yurong Dai