[TriLUG] Default web root

Scott G. Hall ScottGHall at BellSouth.Net
Thu Jun 12 12:58:52 EDT 2008

To help tickle your memory, let me reword your request a little:
you are looking for the manner to help a browser resolve the _base_
URI for relative URI references throughout a document.

In the <header> ... </header> section, include a line:

    <base href="absolute.uri.to.be.document.root">

This also works for when you save a page from your browser onto your
local machine -- you can edit the saved document's code to include
the BASE header and the document will resolve images, scripts, and
stylesheets that are referred via relative paths.

Brian McCullough wrote:
> I am looking for a way to properly turn relative URIs into proper,
> fully qualified, URIs.  What I seem to remember is a ( perhaps
> JavaScript ) value that you can set ( maybe a meta-tag? ) a value
> in the web page that can be used by the browser to resolve any URIs
> that aren't actuallyserved by the server providing the page.
> For instance, I have two servers, east-coast.example.com and
> west-coast.example.com.  ( I know that there are much better ways
> to resolve the example problem, but reality isn't really an example. )
> I am trying to serve all pages from data that is only in the
> west-coast server.  Therefore, a URI like "href=/tets1/image1.png"
> would be acceptable on the west-coast server, but should read:
> "href=http://west-coast.example.com/tets1/image1.png" on the
> east-coast machine.
Scott G. Hall
Raleigh, NC, USA
ScottGHall at BellSouth.Net

More information about the TriLUG mailing list