2012-07-05 151 views
-1

我们有一个在IIS 7上设置的网站,并试图用新网站替换它。IIS 7将默认网站重定向到自定义页面

旧网站使用的自定义文件作为主页,称为WN-main.asp

新网站不再使用ASP,我们想用一个普通index.html作为主文件。然而,当我们去到网站,它不断尝试重新定向我们的.com到.com/WN-main.asp

在IIS的“默认文档”设置中,我们在顶部有index.html,WN- main.asp没有在列表中找到(它从来没有在那里)。 IIS中的这个重定向在哪里? :)

我们还从根目录中删除了web.config文件,并将整个旧网站放在一个子目录中。以及重新启动IIS。任何想法,这个重定向是坐?

谢谢!

+0

要查看实际错误,您可以立即访问http://www.worzalla.com,尽管我们很快就必须恢复旧的ASP网站。 – 2012-07-05 17:01:02

+1

嘿我现在得到这个链接404错误。这解决了吗? – DotNetUser 2012-07-09 21:21:47

+0

-1这个问题已解决,应该删除 – 2012-07-14 20:34:13

回答

0

我们不知道到底是什么结束了这个问题 - 某处,不知何故,老主页可能缓存在服务器上,并且页面本身重定向到/WN-main.asp页面...即使服务器不应该缓存任何内容,并且我们最初已经检查过多次。在玩过很多设置后,它突然开始工作了! Grrr微软。我们禁用并启用了asp和.net的事实可能有所帮助,但我不确定......至少现在它正在工作!

0

在IIS中,您可以将设置配置为除网站以外的其他级别,例如,一个machine.config文件,它定义了服务器所有站点的设置。您网站的最终配置不仅会使用您的web.config,还会使用其他父级配置。

检查这些文件,看是否有定义了这个错误<defaultDocument>

Server-level configuration is stored in the following configuration files:  
- Machine.config. This file is located in %windir%\Microsoft.NET\Framework\framework_version\CONFIG.  
- Root Web.config for the .NET Framework. This file is located in %windir%\Microsoft.NET\Framework\framework_version\CONFIG.  
- ApplicationHost.config. This file is located in %windir%\system32\inetsrv\config. 

Site, application, and virtual and physical directory configuration can be stored in one of the following locations:  
- A server-level configuration file. When configuration for a site, application, directory, or URL is stored in a server-level configuration file, you must use a location tag to specify the site, application, directory, or URL to which the configuration applies.  
- A parent-level Web.config file. When configuration for an application, directory, or URL is stored in a parent-level configuration file, you must use a location tag to specify the child at which the configuration applies.  
- The Web.config file for the site, the application, or the directory. When you configure settings for an application, directory, or URL, the configuration is stored in the same directory as the site, application, or directory. You do not need to use location tags. 

摘自:Working with configuration files in IIS7