Jump to content

Recommended Posts

Posted

Question: If i clone a web page that contains links to other web pages will they still work?

-For example, i clone an index.html.

-the real index.html has links to other pages on the site.

- i am redirecting my network's taffic to my clone of index.html that is on my pc

- if a machine on my network clicks a link on my cloned page will the machine still resort to public dns and go to the speficif web page online?

Posted

Depends on if the links are relative links vs absolute links, and you are also cloning the linked files locally. ie: the page cloned when loaded locally may look funky, if for instance the style sheet is linked relatively - such as "/css/style.css" and if that file is not copied with the same URL path, then its not going to load the CSS file, images, embedded files, etc. You'd have to clone all the linked files as well for it to look the same. Absolute links that point to external data, pages or sites, will take you to the real site when clicked, so if you're trying to do something local with the file and have everything load from your clone only, then you need to also re-write all the URL's for cloned files to point locally or served from wherever you are saving the files from.

As for the DNS lookups, if it sees an absolute URL for the site in the cloned file that is an external resource, ie: real site links, its going to default to do a DNS lookup for the resource at the real location so you'd have to re-write all the URL's to be local to your cloned files.

Not sure exactly what you are trying to do, but there are tools for cloning local copies of sites and crawling/spidering linked pages as well to save them locally with all file resources. One of the easiest tools to learn is wget, which can save a copy of a site locally and you can force it to clone the files linked relatively in the page and create the directories of files for you.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...