IIS server redirect locations

三世轮回 提交于 2020-01-02 21:50:51

问题


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


来源:https://stackoverflow.com/questions/1537635/iis-server-redirect-locations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!