Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Relative links with change of port
January 12, 2004, 12:01 am
rate this thread
I'd like to know if I can use a relative link with change of port. So:
When on server http://126.96.36.199/index.html I could click a relative
link to go to 188.8.131.52:81/index.html . I know I could write a tag
<a href="http://184.108.40.206:81/index.html ">link</a>
But I would like it so I could use it with an ever changing ip address that
I wouldn't need to change the html file.
So how would I write that tag?
Re: Relative links with change of port
However, if you have access to a server-side language, like PHP, you can
do something like:
echo '<a href="http://' . $_SERVER['HTTP_HOST']
. ':81/">Link to port 81 on this server</a>';
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132