Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml GoDaddy共享主机阻止对文件夹和内容的访问,但使用文件夹中的脚本_Xml_.htaccess_Web Config - Fatal编程技术网

Xml GoDaddy共享主机阻止对文件夹和内容的访问,但使用文件夹中的脚本

Xml GoDaddy共享主机阻止对文件夹和内容的访问,但使用文件夹中的脚本,xml,.htaccess,web-config,Xml,.htaccess,Web Config,希望这是容易解决的,因为它让我觉得很傻 我有一个托管在共享windows服务器上的.com,我的根。在我的根目录中有index.php和一个名为“admin”的文件夹 我所要做的就是使用我的index.php来迎接访问者,阻止任何人访问、发布和链接到我的管理文件夹中的任何东西,同时 我在“admin”中尝试了.htaccess和deny all,今天我发现GoDaddys windows server没有注意到.htaccess文件,我不得不使用Web.config:- <?xml ver

希望这是容易解决的,因为它让我觉得很傻

我有一个托管在共享windows服务器上的.com,我的根。在我的根目录中有index.php和一个名为“admin”的文件夹

我所要做的就是使用我的index.php来迎接访问者,阻止任何人访问、发布和链接到我的管理文件夹中的任何东西,同时 我在“admin”中尝试了.htaccess和deny all,今天我发现GoDaddys windows server没有注意到.htaccess文件,我不得不使用Web.config:-

<?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <system.web>
            <authorization>
                <deny users ="*" />
            </authorization>
        </system.web>
    </configuration> 


是我在读了关于它的主题后在“admin”中尝试的,再加上在root中更简单的一些东西,最好的办法是使用窗口密码保护你的admin文件夹,这样任何试图访问你的/admin文件夹的人都需要登录。我不确定godaddy是否有这样的功能,但我知道其他托管公司也有这样的功能。

.htaccess
是Apache的东西。IIS不使用它。如果您想使用PHP和.htaccess,并且不需要任何特定于Windows的东西,如MS SQL或ASP.NET,您可以移动到Linux主机帐户,并且您的.htaccess填充将被识别: