David Kerr wrote:
>
>
>     Philip, I think I understand what you are saying...
>
>     Use the $_SERVER['HTTP_HOST'] to generate the public host and the
>     Prefs tab URL string for the local path... in this special case.
>
>     Possibly if the user specified http://localhost/bla..bla, I could
>     replace "://localhost" with ://$_SERVER['HTTP_HOST'], since localhost
>     would normally have no application in an HTML anchor href=
>
>     Anyone see a problem with this?
>
>
> The only problem would be if the user actually intended "localhost" to 
> mean his real local host (127.0.0.1 <http://127.0.0.1>) perhaps to 
> point to some service that is actually running on his client machine.
>
> A work around would be to document that if the user entered 
> "localhost" then you will remap it... and if they really intended 
> localhost then to enter the IP address "127.0.0.1 <http://127.0.0.1>" 
> instead of the text "localhost".
>
> But a better way may be to use the convention of a single dot meaning 
> that what follows is relative to the current directory. So if I enter 
> http://./bla.bla then the first "." would be replaced with the 
> HTTP_HOST.  In my specific case I want to get to... 
> http://.:8088/asterisk/static/config/index.html  which would make a 
> good test case for you as it has a dot (meaning the host I am 
> connected to) a colon then port number then directory path. If this 
> were parsed out to substitute the current host for the dot then it 
> should work.
>
> Thanks
> David

http://. is not actually a legal URL (even though a lot of browsers will 
handle it).

-Philip


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
PROTECTED]

Reply via email to