Page 1 of 1

localhost you relative rul help needed please

PostPosted: 02. February 2010 22:02
by longshot69
in a nut shell, everything works fine locally however when making calls from externally using ip (eg:http://202.202.202.202/xampp) the page dispalyed fine however all links use localhost (eg: http://localhost/link.php). Problem is that localhost doesnt work very well from an external location. So my issue is how can i get this to change to a relative path so an ip/dyndns call will work for my sites???

Installation
xampplite
windows vista home
firewall port cleared
portforwarded on router
site uses apache/php/mysql

remember it works ok for the first call using the ip that gets routed. using any of the page links are returning localhost as the url. each page can be called individually without issue using ip to the page, just the linking is the problem. as this is with basic xampp pages too, i presume its my installation not the site itself

thanx in advance


**sorry if this is a double post, cant find the first one i tried**

Re: localhost you relative rul help needed please

PostPosted: 02. February 2010 22:14
by Wiedmann
all links use localhost (eg: http://localhost/link.php). ... So my issue is how can i get this to change to a relative path so an ip/dyndns call will work for my sites???

Just don't write "http://localhost/link.php" in your html source code, instead use "link.php". e.g.:
Code: Select all
<a href="link.php">sample link</a>

Re: localhost you relative rul help needed please

PostPosted: 02. February 2010 23:16
by longshot69
thanx but it's not my code.. using the xampp defaults still return localhost addresses..

so from wan

http://[ipaddress]/xampp/ and select link to phpmyadmin rather than show/return a link of http://[ipaddress]/phpmyadmin/ it comes back with http://localhost/phpmyadmin/. this is what is confirming to me its something with my installation not my code.

Re: localhost you relative rul help needed please

PostPosted: 02. February 2010 23:52
by Wiedmann
so from wan

http://[ipaddress]/xampp/ and select link to phpmyadmin

Hm, in the XAMPP menu on the left site, the link to phpMyAdmin is not working, if you access the XAMPP demopage ("http://[ipaddress]/xampp/") from the WAN?

Re: localhost you relative rul help needed please

PostPosted: 03. February 2010 00:12
by longshot69
exactly.
XAMPP demopage ("http://[ipaddress]/xampp/") from the WAN works perfectly

linkage from same references localhost, not the relative ip path.

It does however return values as expected if i call it directly using http://[ipaddress]/phpmyadmin/ so its not the page itself but the pathing

It's got me beat

Re: localhost you relative rul help needed please

PostPosted: 03. February 2010 00:20
by Wiedmann
XAMPP demopage ("http://[ipaddress]/xampp/") from the WAN works perfectly

What happens exactly, if you click in the demopage menu on the link for phpMyAdmin?

linkage from same references localhost,

Hm, doesn't understand this. Sorry.


Just to explain the phpMyAdmin link in the demopage:
This link is hardcoded in the file "navitools.inc" with "<a href='/phpmyadmin/'". And there is no way with a configuration setting to change this to something else.

Re: localhost you relative rul help needed please

PostPosted: 03. February 2010 01:20
by longshot69
im not at that puta right now but if i remember right is a connection error unable to connect to localhost. Which is entirly expected given the reference from a remote host.

Im not sure how else i can say this. the reference always returns a localhost value, irresepective of access. so although i might call the initial page via ip where the routing takes place (and works), subsequent calls from the pages return relative values of localhost that cannot be used a lan/wan machine (which dont due to the localhost). So the lniks might be hardcoded as relative but something is defaulting the relative to localhost and not resolving ip/dns so bad returns are given.

I'm thniking i might just have to blow the whole install away and try xampp full. i really dont want to have to create a routing solution to return localghost values out to the internet to come back in again.

I might have to just accept that if a full xampp install doesnt resolve the problem start the hunt for an alternate solution?? Im just lost as i have never experienced this with xampp before (tho i have never installed/run on vista or xampplite)

Well, thanx for the support try. ppreciate your efforts.

Re: localhost you relative rul help needed please

PostPosted: 23. May 2010 23:12
by DanoNH
Try re-applying your Permalink settings in WP. This worked for me...