Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What to replace localhost with, in link??

Status
Not open for further replies.

PopcornBuzzard

Programmer
Mar 26, 2003
7
US
Have a silly question here...

I have an include file that has a link like this:

<a href=&quot;//localhost/WebProject/ProductGeneral/FirstPage.asp&quot;> Go there! </a>

I am getting ready to ftp it to our web hosting company's web server. How would I change the link above to work on their web server?

Like this, since, say, is our domain name?

<a href=&quot;// Go there! </a>
 
You can use referential linking. You don't need to explicitly define a domain name.

for example. If
Code:
www.website.com
is the address of the home page, and you wanted to make a link to a subfolder of that page, you can write the href like this:

href=&quot;subfolder/page.html&quot;

I'm not sure where it happens, but the browser or server automatically translates that line to &quot;
The only time you need to explicitly define the server name is if you are linking from outside that domain.

Earnie Eng
If you are born once, you will die twice.
If you are born twice, you will die once
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top