My localhost (apache2) on Mac OS High Sierra suddenly starts redirecting to https://wmich.edu/cs. It seems like localhost is resolving to the external IP instead of 127.0.0.1. I visited the wmich website (using Firefox) last week. This is what I have tried so far:
-Accessed http://localhost from three different browsers (Firefox, Chrome, Safari) but all are redirecting to https://wmich.edu/cs.
-Cleared cache on the browsers
-Checked httpd.conf and .htaccess for any Redirection but couldn't find anything.
-Checked for any installed browser extensions, but there are none.
-Ran Avast Security but couldn't find anything
-Run cURL on terminal with the following output
curl -I localhost HTTP/1.1 301 Moved Permanently Date: Sat, 04 Jul 2020 10:04:19 GMT Server: Apache/2.4.41 (Ubuntu) Location: https://cs.wmich.edu/ Content-Type: text/html; charset=iso-8859-1
curl -I 127.0.0.1 curl: (56) Recv failure: Connection reset by peer
-Ping localhost with the following output:
PING 127.0.01 (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.097 ms
-Ping 127.0.0.1 with the following output:
PING 127.0.0.1 (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.103 ms
-Stopped the web server altogether with "sudo apachectl stop" but the redirection still continues. cURL and ping are also giving the same output after the server is stopped.
I went over similar questions like the following but couldn't find a solution
Suddenly my localhost website redirects to some hosting company's website localhost doesn't resolve to 127.0.0.1