IIS server redirect locations

2019-06-04 22:12发布

问题:

I got a asp site hosted in a iis server. In the server there is a virtual folder products and whenever a url like xyz.com/products/abc_11.asp is provided it is forwared to xyz.com/product.asp?id=11 page.

I would like to know from where we can change that settings?

These settings or tasks can be done from where?

Thnx

回答1:

Does the folder "products" or file "abc_11.asp" physically exist on the webserver? There are many ways to accomplish the task of having a sepcific url forward to another url.

  1. There are URL rewritting ISAPI addons for IIS, like ISAPI_Rewrite. ISAPI_Rewrite will have a httpd.ini file either in the ISAPI_Rewrite installation folder or the physical folder for the website.

  2. II6 has the ability to redirect a request for a folder or a file to another location. This is configured by viewing the properties for the folder or file in the IIS Admin. On the Directory/File tab you will see 3 radio buttons, one of which is "A redirection to a URL".

  3. The file can physically exists and in it is code to redirect the user.



回答2:

If non of mike's suggestions match your setup it's also possible to accomplish the redirection using a custom 404 error page.

  • See what is specified for 404 in IIS for the website on the "Custom Errors" tab
  • If the type is "URL" rather than "File" then I'd say there's a good chance that code in the file that the URL specifies is performing the redirection