Re: base tag

by "Steve Mount" <steve(at)saltyrain.com>

 Date:  Thu, 6 Mar 2003 23:29:38 -0500
 To:  "Mike H" <ironmike(at)inav.net>,
<hwg-techniques(at)hwg.org>
 References:  trustyii
  todo: View Thread, Original
Since all relative URLs will use the new base, if you refer to a page in the
same directory, you will have to provide the full path to that page.  In the
example given, we had a page in /1/2/3/page.html and an image in
/images/picture.jpg.  With the base tag setting the base URL to /
(essentially), for page.html to refer to /1/2/3/page2.html, the url would
have to be: <a href="/1/2/3/page2.html"> (or <a href="1/2/3/page2.html">)
instead of just <a href="page2.html">.  Also, any relative pathnames would
need to be redone:

<a href="../4/page.html">

would have to change to

<a href="/1/2/4/page.html"> or <a href="1/2/4/page.html">

-------------------------------------------------------------
Steve Mount, Software Engineer            steve(at)saltyrain.com
Home Site                            http://www.saltyrain.com
US Constitution Online          http://www.usconstitution.net


----- Original Message -----
From: "Mike H" <ironmike(at)inav.net>
To: <hwg-techniques(at)hwg.org>
Sent: Thursday, March 06, 2003 10:47 PM
Subject: base tag


> In an earlier exchange today Steve Mount gave this (partial) reply to a
question about directory structure and finding files in a
> site directory:
>
> >>Alternately, you can use add "base" tag in each page's head, though it
may
> cause other problems, as all relative URLs will use the new base:<<
>
> My question is: what "other problems"?
>
> Thanks!
>
> Mike Hopkins
> ironmike(at)inav.net
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA