URL is redirected to localhost (incorrectly)

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
woger
Forum Newbie
Posts: 13
Joined: Tue Jan 02, 2007 4:03 am

URL is redirected to localhost (incorrectly)

Post by woger »

Hi
I'm using WAMP 1.6.6 on Win XP
I have a Bipac 7300 Router setup with Virtual server to redirect incoming requests on port 80 to the internal IP address.

I'm using a dynamic dns too - I believe it's set up correctly.

When I put my "domain" in - basil.dyn-o-saur.com into the browser, it redirects to http://localhost/xxxxx/login/index.php

In my httpd.conf file, I can't find reference to that anywhere:
I have in the file:
Listen 80
ServerName basil.dyn-o-saur.com:80

I've checked httpd.conf for some config that would redirect to localhost - where I was testing before trying to go live.

Any suggestions on where I've gone wrong please?

Woger
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The router shouldn't be redirecting so much as forwarding.
woger
Forum Newbie
Posts: 13
Joined: Tue Jan 02, 2007 4:03 am

Post by woger »

Thanks. Forwarding is what I should have typed!!
woger
Forum Newbie
Posts: 13
Joined: Tue Jan 02, 2007 4:03 am

Post by woger »

Fixed the problem

As basic as a problem with a redirect in a HTML page

Thanks
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Works from outside the router.. which is the correct behaviour. I was redirected to http://basil.dyn-o-saur.com/college/login/index.php

If you want to fully mock the environment from inside your network, open:

Code: Select all

c:\WINDOWS\system32\drivers\etc\hosts
and add the following line:

Code: Select all

basil.dyn-o-saur.com    127.0.0.1
This file is trusted over your DNS server, so you can override domain resolution for the local machine here.
Post Reply