Hello:
I need to let users to enter urls such as
Http://domain name/a number. So that I could change the URL to http://domain name?id=the number.
I know that this is possible through the rewrite rule and there are examples of it on the web. However, I was thinking if there is any possibility to first let iis to redirect to a custom error page as the original URL is not recognized. And then within the error page get the original URL and make all necessary changes and redirect again to the modified URL.
It seems to me that is not possible to get the original URL in the custom error page and that should be the reason that Microsoft created the rewrite module. I also thought that the rewrite rule is for many other complicated reasons too.
So as I am new to the subject, I thought it might be worthwhile to ask if there is any possibility to get the original URL after redirection to the custom error page without using the rewrite rule.
If it is not possible to accomplish such task without the rewrite rule, could you please tell me with example code how could I send the original URL to a custom error page using the rewrite rule? The original URL in the custom error page would be beneficial because instead of simply creating name, value query string parameter and replacing the original URL with the rewrite rule, I could do other things easier in ASP within the custom error page.
Thank you for your response.
I need to let users to enter urls such as
Http://domain name/a number. So that I could change the URL to http://domain name?id=the number.
I know that this is possible through the rewrite rule and there are examples of it on the web. However, I was thinking if there is any possibility to first let iis to redirect to a custom error page as the original URL is not recognized. And then within the error page get the original URL and make all necessary changes and redirect again to the modified URL.
It seems to me that is not possible to get the original URL in the custom error page and that should be the reason that Microsoft created the rewrite module. I also thought that the rewrite rule is for many other complicated reasons too.
So as I am new to the subject, I thought it might be worthwhile to ask if there is any possibility to get the original URL after redirection to the custom error page without using the rewrite rule.
If it is not possible to accomplish such task without the rewrite rule, could you please tell me with example code how could I send the original URL to a custom error page using the rewrite rule? The original URL in the custom error page would be beneficial because instead of simply creating name, value query string parameter and replacing the original URL with the rewrite rule, I could do other things easier in ASP within the custom error page.
Thank you for your response.