[英]Secure HTML Files or Secure Folder Which Contain HTML and PHP files in PHP (Wordpress)
i have developed a project which uses HTML files (present in a single folder) in a iframe. 我已经开发了一个在iframe中使用HTML文件(位于单个文件夹中)的项目。 I have created a index.php which required login to access and inside this index.php i use index.html in a iframe.
我创建了一个index.php,需要登录才能访问,并且在此index.php内,我在iframe中使用index.html。 The problem is if the user call directly call index.html then it can directly see index.html.
问题是,如果用户调用直接调用index.html,那么它可以直接看到index.html。 I want to restrict the users to see index.html directly .
我想限制用户直接看到index.html。 I have created this project inside wordpress and use IIS as a web server.
我已经在wordpress中创建了这个项目,并使用IIS作为Web服务器。
If you are under IIS 7.x, create a web.config file in your folder which you would like to restrict access and type or paste the following into it. 如果您使用的是IIS 7.x,请在您要限制访问的文件夹中创建一个web.config文件,然后在其中键入或粘贴以下内容。 It should look something like this:
它看起来应该像这样:
<?xml version="1.0"?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<hiddenSegments applyToWebDAV="false">
<add segment="myfoldername" />
</hiddenSegments>
</requestFiltering>
</security>
</system.webServer>
</configuration>
Have a look at the following resource for more information : 请查看以下资源以获取更多信息:
http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/hiddenSegments http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/hiddenSegments
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.