IIS7 Virtual Directory Redirects

橙三吉。 提交于 2020-01-06 01:07:10

问题


On our old IIS6 server, we handled IIS redirects by:

  • Setting up a virtual directory on the site
  • Pointing the virtual directory to a physical path on the server
  • In the VD properties, set it to redirect to a URL

I'm trying to replicate this in IIS7 by doing the following:

  • Set up a virtual directory on the site
  • Point the virtual directory to a physical path on the server
  • In the VD features, double click on HTTP Redirect and add the URL to redirect to.

This works fine if I only have one virtual directory. If I add another, the settings in the second VD overwrite the settings of the first!

Is this a common issue, and has anyone found a workaround? Anything would be appreciated.


回答1:


When you configure an HTTP Redirect in IIS 7 for a Virtual Directory it creates a web.config file in the physical path. The work around is to point each Virtual Directory to a unique physical path.

I use folder structure like this: \path\redirects[site_name][virtual_dir_name]



来源:https://stackoverflow.com/questions/17943998/iis7-virtual-directory-redirects

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