我有 default.aspx 和 index.html。我将两者都上传到服务器,但我希望我的第一页以 index.html 开头。我应该怎么办?
问问题
4643 次
5 回答
8
如果您无权访问 IIS,并且您托管在 IIS 7 (Windows Server 2008) 上,您可能希望将其放入您的web.config
文件中:
<system.webServer>
<defaultDocument>
<files>
<clear / >
<add value="index.html" />
</files>
</defaultDocument>
</system.webServer>
于 2010-01-06T09:56:17.777 回答
3
您需要在托管 ASP.NET 应用程序的虚拟目录的属性中对其进行配置。放在index.html
前面default.aspx
(来源:plus2net.com)
于 2010-01-06T09:53:36.460 回答
2
您需要更改默认文档列表的顺序以将 index.htm 置于顶部,在 IIS6 上,可以在 IIS 管理器站点的“属性”对话框的“文档”选项卡上找到。
于 2010-01-06T09:54:06.600 回答
1
您需要在 IIS 中进行设置。在 IIS 管理器中,这将位于Documents
选项卡下。
于 2010-01-06T09:54:23.130 回答
1
如果您无权访问 IIS,请在您的 default.aspx 页面中将其写入您的代码后面。
Response.Redirect("index.htm");
于 2010-01-06T09:55:16.567 回答