Mac 上的 MAMP 将虚拟本地主机重定向到 https
MAMP on Mac redirects virtual localhost to https
Chrome版本:67.0.3396.87
网络服务器:Apache
当我点击http://www.assignmenthelpdesk.local , it redirects to https://www.assignmenthelpdesk.local/
如何阻止 MAMP 重定向到 https?提前致谢。
/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf 详细信息如下:
<VirtualHost *:80>
DocumentRoot /Applications/MAMP/htdocs
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /Applications/MAMP/htdocs/AssignmentHelpDesk
ServerName www.assignmenthelpdesk.local
</VirtualHost>
/etc/hosts 详情
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
127.0.0.1 www.assignmenthelpdesk.local
255.255.255.255 broadcasthost
::1 localhost
/Applications/MAMP/conf/apache/httpd.conf 详细信息如下:
# Virtual hosts
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
现在一切正常。
我只需要从 .htaccess 中删除以下两行以用于 assignmenthelpdesk(本地文件夹)
RewriteCond %{HTTPS} 关闭
重写规则 ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Chrome版本:67.0.3396.87
网络服务器:Apache
当我点击http://www.assignmenthelpdesk.local , it redirects to https://www.assignmenthelpdesk.local/
如何阻止 MAMP 重定向到 https?提前致谢。
/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf 详细信息如下:
<VirtualHost *:80>
DocumentRoot /Applications/MAMP/htdocs
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /Applications/MAMP/htdocs/AssignmentHelpDesk
ServerName www.assignmenthelpdesk.local
</VirtualHost>
/etc/hosts 详情
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
127.0.0.1 www.assignmenthelpdesk.local
255.255.255.255 broadcasthost
::1 localhost
/Applications/MAMP/conf/apache/httpd.conf 详细信息如下:
# Virtual hosts
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
现在一切正常。
我只需要从 .htaccess 中删除以下两行以用于 assignmenthelpdesk(本地文件夹)
RewriteCond %{HTTPS} 关闭
重写规则 ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]