|
Posted by Ben C on 12/14/06 20:31
On 2006-12-14, equation <equation@techemail.com> wrote:
> Can anyone with a higher IQ or better memory of html syntax help me out
> with this probleme?
> equation wrote:
>> I have a long html of links with hrefs like this:
>>
>> href="/directory/subdir/file.pdf"
>>
>> 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/" >
>> Now,
>>
>> 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:
>>
>> href="./directory/subdir/file.pdf"
>>
>> or as
>>
>> href="../directory/subdir/file.pdf"
>>
>> or as
>>
>> href="../somelongpath/directory/subdir/file.pdf"
>>
>> depending on the relative position of my html of links with respect to
>> the pdf on the same machine.
Is the pdf on the CD?
>> 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.
[snip]
>> SUMMARY:
>> (1) a simple method to make the absolute hrefs to relative without
>> editing them, by somehow prepending to them "../somelongpath/"
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?
[Back to original message]
|