IIS 6上的子文件夹中的不同默认文档类型 [英] Different Default Document Type in Subfolder on IIS 6

查看:140
本文介绍了IIS 6上的子文件夹中的不同默认文档类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我之前从未使用过PHP的IIS服务器,但我的问题是我可以在web.config中为子文件夹设置默认文档类型,这就是我的想法(它是一个bbPress论坛):

I've never worked on an IIS server with PHP before, but my question is can I set a default document type for a subfolder in the web.config, this is what I have in mind (its a bbPress forum):

<location path="forum">
<system.webServer>
    <defaultDocument>
        <files>
            <add value="index.php" />
        </files>
    </defaultDocument>
</system.webServer>
</location>

感谢并向回答者提供虚拟啤酒:D

Thanks and a virtual beer to the person who answers :D

推荐答案

如果你使用的是IIS7,你建议的配置确实会改变子文件夹的默认文件论坛 index.php

If you're using IIS7, the configuration you suggest will indeed change the default document for just the subfolder forum to index.php.

如果这是IIS 6那么它将不适用于非管理用户。 IIS 6将这些设置存储在元数据库中,并且只能使用以下命令进行编辑:

If this is IIS 6 then it won't work for a non-administrative user. IIS 6 stores these settings in the metabase and can only be edited using:


  • IIS管理控制台

  • 以编程方式,但修改应用程序需要管理员权限

  • 直接元数据库编辑

< system.webServer> xml web.config 设置仅适用于IIS 7及更高版本,IIS 6将完全忽略这些设置。

The <system.webServer> xml web.config settings are only applicable to IIS 7 and above, IIS 6 will completely ignore these.

这篇关于IIS 6上的子文件夹中的不同默认文档类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆