0
Has anybody noticed that Chrome sometimes changes a URL you enter to a slightly different one that you've entered before? Going Incognito fixes the problem, but I want to clear the cached URL, or tell Chrome to not change to these anymore.
I set up a new WordPress site using MAMP. I like to add subdomains for new projects, so I added 127.0.0.1 newsite.localhost
to /etc/hosts
and added a VirtualHost to MAMP's httpd.conf
, putting newsite.localhost
below oldsite.localhost
(where oldsite
is another project). I navigate to newsite.localhost
and Chrome changes it to oldsite.localhost
. I can only reach newsite
through an Incognito tab
All of the combinations redirect to oldsite.localhost
http://localhost
localhost
http://newsite.localhost
etc..
EDIT: Here is the relevant part of my /etc/hosts
file:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
192.168.64.2 localhost
127.0.0.1 oldsite.localhost
127.0.0.1 newsite.localhost
And MAMP's httpd-vhosts.conf
<VirtualHost *:80>
ServerName newsite.localhost
DocumentRoot /Users/jared/work/MAMP-hosts/new-site
</VirtualHost>
Please [edit] your question and include the contents of your
hosts
file. Chrome isn't changing anything, it is following the "rules" you have specified in your hosts file and/or your Apache configuration. You should also try clearing your cookies. – Dave – 2019-05-01T11:08:14.273Okay, added above. But how does this explain why I can navigate to
newsite.localhost
in an Incognito tab but not in a regular tab? I even cleared cookies for all thingslocalhost
– nth-chile – 2019-05-09T20:47:48.240