|
Posted by equation on 12/14/06 02:55
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.
>
>
> 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.
>
> equation.
>
> SUMMARY:
> (1) a simple method to make the absolute hrefs to relative without
> editing them, by somehow prepending to them "../somelongpath/"
Navigation:
[Reply to this message]
|