Localhost redirects to a website I didn't set

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Localhost redirects to a website I didn't set

Postby snekadid » 01. December 2014 10:29

Hi all, I apologize if I have trouble explaining my problem or if it falls outside the specifics of this board, but I'm at my wits end and after 7+ hours of google searching over the last week this is the only place I could think might be able to help.

I'm a student earning my bachelors in CS and use Xampp to test my php code for my last class. However recently something odd occurred.
While testing a page it first went to Localhost and instead of opening the project folder I had set, as it usually did, it instead redirected to the colleges database. Now I can no longer access localhost without it sending me to the DB and as a result cannot access my project for testing. I have no idea how it happened, I've checked all the Xampp documents and none of them have the DB address so the redirect makes no sense to me. I even tried Wamp and have the same issue so I don't think the problem is with the application itself.

I'm running this on a laptop with Windows 7 64x.
snekadid
 
Posts: 3
Joined: 01. December 2014 10:12
Operating System: Windows 7 64 bit

Re: Localhost redirects to a website I didn't set

Postby WilliL » 01. December 2014 11:32

hi,
just a guess:
redirection in .htaccess or html/php index file in localhost roor directory
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: Localhost redirects to a website I didn't set

Postby snekadid » 01. December 2014 21:18

I don't think that's it since changing the localhost directory in the apache(httpd.config) file doesn't change the issue.
It still goes to that site even when set to desktop.
snekadid
 
Posts: 3
Joined: 01. December 2014 10:12
Operating System: Windows 7 64 bit

Re: Localhost redirects to a website I didn't set

Postby gsmith » 01. December 2014 21:56

I'd take a look at the windows hosts file and see what IP localhost is pointing to
::1 or 127.0.0.1 it should be.
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: Localhost redirects to a website I didn't set

Postby snekadid » 01. December 2014 22:07

How do I check that? It's one of the things I tried to find out online but couldn't find anything useful.
snekadid
 
Posts: 3
Joined: 01. December 2014 10:12
Operating System: Windows 7 64 bit

Re: Localhost redirects to a website I didn't set

Postby Nobbie » 01. December 2014 22:43

snekadid wrote:It's one of the things I tried to find out online but couldn't find anything useful.


??

Enter "Windows hosts file" in Google and you will probably get more than 1 million usefull hits.

P.S.: I get 5.510.000 (!!!) hits in Google. None of them usefull?
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Localhost redirects to a website I didn't set

Postby Altrea » 01. December 2014 23:25

snekadid wrote:How do I check that?

Open your Windows command line and type in
Code: Select all
ping localhost
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 119 guests