Every http
site in my newly installed WampServer 3.1.0 64-bit is automatically redirecting simple index.html
files with no .htaccess
to the https
version of the site.
I can see no .htaccess
file in C:\wamp64\www
or C:\wamp64\www\example
.
If I uninstall WampServer, and install XAMPPserver, the same thing occurs.
Help appreciated.
httpd-vhosts.conf:
<VirtualHost www.superiorit.dev:80>
ServerAdmin steve.doig@superiorit.com.au
DocumentRoot "C:/xampp/htdocs/superiorit"
ServerName www.superiorit.dev
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
httpd-ssl.conf:
is the standard default file.
The only change I have made to httpd.conf
is:
Listen 172.18.1.106:80
I noticed the Chrome icon in the Windows task bar looks different to the normal Chrome icon:
If I load the site in Edge, the redirection does not occur.
Within a Virtual Host definition you also need tell Apache it is allowed to access the directories that hold the site code i.e. a <Directory>
I also learned recently that Google owns the .dev
tLD so you should consider using something else instead, specially if you are using Chrome browser as google could add anything in there to pick up the use of .dev
and, well, do anything.
I now find out that as of V63 Chrome does in fact force a redirection of .dev
This will also be happening to FF and other browsers
You also dont need to specify the domain name on the <VirtualHost www.superiorit.dev:80>
line. The *
is fine.
So try this an see if things improve.
<VirtualHost *:80>
ServerName superiorit.local
ServerAlias www.superiorit.local
DocumentRoot C:/xampp/htdocs/superiorit
<Directory "C:/xampp/htdocs/superiorit/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require local
</Directory>
ErrorLog "logs/superiorit.local-error.log"
CustomLog "logs/superiorit.local-access.log" common
</VirtualHost>
Also have a look at Why all *.dev domains target to my localhost?