[Linux-disciples] Relative links from wget recursive retrievals

Adam Kessel linux-disciples@bostoncoop.net
Fri, 6 Feb 2004 13:42:18 -0500


Hm, "Adam Kessel" = linux-disciples? (to: line)

wget

 -k
 --convert-links
     After the download is complete, convert the links in the document
     to make them suitable for local viewing.  This affects not only the
     visible hyperlinks, but any part of the document that links to
     external content, such as embedded images, links to style sheets,
     hyperlinks to non-HTML content, etc.

 -B URL
 --base=URL
     When used in conjunction with -F, prepends URL to relative links in
     the file specified by -i.

Does that solve it?

On Fri, Feb 06, 2004 at 11:51:28AM -0500, Stephen R Laniel wrote:
> I'm downloading a website recursively for work, and I'm running
> into a problem: it's saving relative links correctly, which means
> the linked pages don't load properly.
> 
> E.g., one of the relative links is to '/whatsnew'. That's
> http://foo.com/whatsnew on the website, but it's
> c:\foo\a\b\c\d\whatsnew on my hard drive. When I try to open
> '/whatsnew' on my hard drive, my browser looks for something in
> c:\whatsnew.
> 
> So basically: is there a way to make my browser or wget or
> *someone* use a different directory as the root for relative
> links?
> 
-- 
Adam Kessel
http://adam.rosi-kessel.org