HyperLink Syntax

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have two web sites on the same server.

I want to create a hyperlink from a page on one website to a page on the
other website.

Is it possible to create a link that does not reference the server name?

The only way I can get a link to work is if I specify the entire path (with
server name). This means I have to change my code for a different server
name everytime I post from my Development environment to the Production
environment.

Does anyone have a solution so I don't have to change hardcoded references
for server names?
 
Is each website a separate domain??
If so are both domain registered with DNS??
If so, simply use an absolute link.
href="http://www.website.com/foldername/filename"

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
I believe you're asking about "relative URLS" vs "Absolute URLS", as in the
examples below:

Link using a Relative URL is something like <a
href="../../yourfile.html">Click here for your file</a>

Link using Relative URL is something like <a
href="www.yoursite.com/yourfile.html">Click here for your file</a>

So yes you can do that.

In Frontpage, type the text for the link then select that text then go to
Insert > Hyperlink. Select the file (or type the name of the file, but not
the entire URL address) into the field and click "OK". That will create the
link, and it will work where-ever you publish the page whether to your test
or live server.
 
Relative links cannot be used between different web sites, wherever the
sites are located, unless they are viewed using the file system - this is
not practical in the real world.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top