[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing relative links to absolute



ERIC STEDFELD wrote:
> 
> I created a first script to connect to a remote Web page, based on 
> input from several sources, but unfortunately the page that I'm 
> connecting to has relative links for displaying graphics, relative 
> links to other pages, etc. These display as broken links in the page 
> that my script returns to the user. I'm trying to do a few 
> substitutions in my script, to change the relative links to absolute 
> in the page that is returned to the user, ...

I think, rather than fixing all the relative URLs in the page,
you could just add a BASE element in the header of the document.
That tells the browser to use that URL as the base for all
relative URLs in the document.  (Of course, if the document
already has a BASE element, then that won't work... )

John Porter