By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,945 Members | 1,703 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,945 IT Pros & Developers. It's quick & easy.

Converting links in HTML documents to relative URL ?

P: n/a
Is there some command-line program for Unix to make all links
relative in HTML documents saved in wget -x fashion ?
( saved as ./

For example,

- if ./ contains <img src="/images/d.jpg">
and ./
exists, replace that tag by <img src="../images/d.jpg">

- if ./ contains <a href="">
and ./
exists, replace that tag by <a href="../../">

I know about wget -k and it doesn't do what I need. My goal is
to use wget or some such to have an exact mirror of the web site
and then make a _copy_ of the mirror that can be navigated

Thanks in advance.

André Majorel <URL:>
"Je regrette le Concorde. Au moins il vous amenait directement à
l'hôtel." -- Cyrano
Sep 4 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.