?
Solved

canning websites removing external dependency

Posted on 2011-04-19
1
Medium Priority
?
377 Views
Last Modified: 2012-05-11
I need to "can" a list of sites as in get a local copy and remove all external dependencies links so that I can use it in repeated tests and for it not to make any external requests or connections.
How do you recommend I go about doing this?
0
Comment
Question by:NewtonianB
1 Comment
 
LVL 20

Accepted Solution

by:
thehagman earned 2000 total points
ID: 35433527
Replace all occurances of http://some-other-site by http://your-domain-name.
The following perl command might work

perl -i.bak -npe 's{https?://[^\/"\? ]+}{http://www.yourdomain.com}g' *.html

This will of course result in local but invalid links.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A few customers have recently asked my thoughts on Password Managers.  As Security is a big part of our industry I was initially very hesitant and sceptical about giving a program all of my secret passwords.  But as I was getting asked about them mo…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question