Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: converting absolute to relative links

by ColonelPanic (Friar)
on Feb 03, 2001 at 20:09 UTC ( [id://56224]=note: print w/replies, xml ) Need Help??


in reply to converting absolute to relative links

If all the HTML pages are in the base directory, a single line like below would do the trick:
s|(img src=")myserver\.com/|$1|g; before: img src="blahblah.com/images/pic.gif" after: img src="images/pic.gif"
Just run it on each file, and it should be good to go.

When's the last time you used duct tape on a duct? --Larry Wall

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://56224]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-04-24 14:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found