【发布时间】:2015-09-27 21:30:36
【问题描述】:
这就是我正在处理的问题。我在 httpd.conf 文件中有以下内容。这会按预期强制对 127.0.0.1/example 进行身份验证。
<Location /example/>
AuthType Basic
AuthName ...
AuthUser File ...
Require valid-user
</Location>
我还有一个php文件如下(http://127.0.0.1/pre2.php)
<?php if(isMember()=='access'){?>
<iframe src="http://127.0.0.1/example" style="border: none; width:100%; height:1100px;"></iframe>
<?php
}?>
当通过 pre2.php 中的 iframe 访问 127.0.0.1/example 时,我需要确保 apache 不会调用身份验证。
【问题讨论】:
-
看看这里 [htaccess exclude one url from Basic Auth][1] [1]: stackoverflow.com/questions/8978080/…
-
问题是请求以相同的路径开始。不是吗?
标签: php apache .htaccess iframe http-headers