【发布时间】:2015-08-06 13:28:52
【问题描述】:
在工作中,我们为客户提供了一个平台,要求他们的员工使用 HTTP Digest 登录。要浏览该站点,他们输入类似theircompany.mycompany.com 的内容。在 Chrome/IE/FireFox 中,他们可以登录。
但是,在 Microsoft Edge 中,他们只有在键入时才能登录
theircompany.mycompany.com/index.php。如果他们不这样做,身份验证屏幕会继续显示,即使在正确输入他们的凭据并且开发人员工具中的network 部分显示401 Unauthorised 之后也是如此。
有谁知道这个问题,如何解决它,或者如何在实际附加 index.php 旁边使用解决方法?
-EDIT- 下面是用于相关站点的虚拟主机文件。
<VirtualHost *:80>
ServerName theircomapny.mycompany.com
LogLevel error
CustomLog ${APACHE_LOG_DIR}/theircomapny.mycompany.com-access.log combined
ErrorLog ${APACHE_LOG_DIR}/theircomapny.mycompany.com-error.log
DocumentRoot /var/www/theircompany
<Directory /var/www/theircompany>
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName theircomapny.mycompany.com
LogLevel error
CustomLog ${APACHE_LOG_DIR}/theircomapny.mycompany.com-access.log combined
ErrorLog ${APACHE_LOG_DIR}/theircomapny.mycompany.com-error.log
DocumentRoot /var/www/theircompany
<Directory /var/www/theircompany>
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
-EDIT- 我刚刚尝试使用全新的 MAMP 安装和示例 #2 中位于 here 的示例代码来重现该问题
完全相同,所以我怀疑这是任何 .htaccess 问题。
【问题讨论】:
-
你能展示你的 .htaccess 和 vhost 吗?
-
我可以,让我拿来。
-
将 url 从
theircompany.mycompany.com更改为theircompany.mycompany.com/index.php将在.htaccess中完成。所以你的.htaccess可能有错误。 -
知道这只能在 Microsoft Edge 中发生吗?
-
由于 .htacess 问题不太可能发生这种情况,因为我在运行 PHP 的 Windows Server 上遇到了完全相同的问题。有人找到解决方案了吗?
标签: php basic-authentication windows-10 http-status-code-401 microsoft-edge