I use xampp on a windows machine.
This is my httpd-vhosts.conf file:
<VirtualHost *:80>
DocumentRoot "F:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "F:/xampp/htdocs/2018_xxx.de/public"
ServerName xxx.dev
<Directory "F:/xampp/htdocs/2018_xxx.de/public">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
This is my C:\Windows\System32\drivers\etc\hosts file:
127.0.0.1 localhost
127.0.0.1 xxx.dev
On calling URLs like http://localhost/thisexists.php or http://localhost/thisonetoo.php , everything is fine!
The call http://xxx.dev however is redirected to https://xxx.dev and I get an abort page like this (firefox 59): Insecure Connection - Your connection is not secure
error message insecure connection
With Chrome, Safari and Opera I get similar results. The only working browser is Edge - yikes!
how can I avoid the redirection to https?
答案 0 :(得分:0)
在此处找到我的问题的简单答案:Local virtual hosts show Privacy Error on Chrome due to HSTS
简单的解决方案:只需停止将.dev扩展名用于 .test 等其他内容,例如my-new-blog.test