Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
December 13, 2006, 8:50 pm
rate this thread
I have a long html of links with hrefs like this:
when I put this site on my internal server, I can see it from a client
machine using the html of links on my client if I only put this line in
the <head> of the html document:
<BASE href="http://myserver/" >
I put this site on my client on a CD for example running as drive G: .
Its a window machine.
I must modify every link in my html file as follows:
depending on the relative position of my html of links with respect to
the pdf on the same machine.
But due to "somelongpath" the html file becomes messy and I want to
make minimal changes.
Furthermore, I want to put my html file on the same CD. I also want
this CD to be transportable
from machine to machine so that CD may be called D: E: F: or G: etc.
Is there a simple solution to this using something like <BASE href="">
in the head to apply it to all the links?
I tried a few hacks with the BASE but it only seems to cause changes in
absolute path, not the relative path.
I appreciate any help.
(1) a simple method to make the absolute hrefs to relative without
editing them, by somehow prepending to them "../somelongpath/"
Re: CONVERTING all links by a simple TRICK ? like BASE for RELATIVE PATH ?
Is the pdf on the CD?
I don't believe this is possible without editing the hrefs to make them
all relative. As you discovered, and as it says in the HTML standard,
the href attribute of the BASE element has to be an absolute URI.
Why can't you edit the hrefs?