1

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?

  • You may wish to use a different example url - the ones you've used have a habit of leading somewhere NSFW... – 9bO3av5fw5 May 17 '20 at 14:02

2 Answers2

3

Found a simple answer to my question here: Local virtual hosts show Privacy Error on Chrome due to HSTS

The simple solution: just stop using the .dev extension to something other like .test, for example my-new-blog.test

0

For anyone trying to use .net, like I was, change it to .com that it'll work.

Rod Rodrigues
  • 53
  • 1
  • 9