-1
I don’t know if this is the right place to post this question, if I’m wrong please correct me.
Anyway, I’m trying to access my localhost/passagem
and it redirects me to the production site.
I have tried to clear Cache with CTRL+F5
, SHIFT+CTRL+F5
and CTRL+R
, and also, Google Chrome Hard Reload. I have also tried to reinstall Chrome which also failed to resolve.
I followed in Stack gringo’s footsteps: https://stackoverflow.com/questions/25277457/google-chrome-redirecting-localhost-to-https and it didn’t work either.
I did some tests, I tried to access the localhost by IP 127.0.0.1 and it worked, however, by 127.0.1.1 it redirects to production.
My hosts file (/etc/hosts) has the following IP’s:
127.0.0.1 localhost
127.0.1.1 rodoviario
I tried to change the 127.0.1.1 to 127.0.0.1 and highway to localhost and also could not.
Does anyone have any idea why this happens?
Which web server? What programming language? Does your program have any reference to production hostname So the generated links are for example:
<a href='https://producao.com'> home </a>
?– LeonanCarvalho
Most likely who’s redirecting you is
localhost/passagem
, not Chrome.– Dudaskank
The web server is apache and the language is PHP with HTML and JS
– Bruno Folle
It’s funny that Mozilla doesn’t have this problem
– Bruno Folle