0

Soemone advised me to simply replace the URL with a backwards slash (edit: I meant to say forward slash), followed by the file name. This points my browsers to my C drive. I also recently learned that Linux uses forward slashes, so such a modification would not work for someone on a Linux computer, would it (edit: I meant to say forward slash)? I tried a second thing, which yielded some weird results. I observed that URLs in the source code of a particular saved web page had two dots preceding the backwards slash. So, same thing I described in the first sentence, but with two periods at the beginning. So I tried adding the two dots and the weirdest thing happened. The link would point my browsers in the direction of the file (which was in a folder that was in the same folder as the web page), but it would stop short one folder. To make things even weirder, when I moved the target content to where the URL was pointing, the URL's target would change again! Kind of like trying to grip a wet bar of soap that keeps slipping out of your hands. There was however, one adjustment where I was able to make it work, and there was nothing special about that adjustment that I can recall.

So, is it possible to modify saved web page URLs to point to a local location, and in a way that will be compatible for all computers?

1 Answer 1

0

The usage of forward slashes in an HTML-file to point to other files is both compatible and --normal--. Back slashes should not be used in URLs.

If you want to save a web site locally, you will need to save each page in folders relative to each other, just like on the original web site.

The problems you are having are due to you missing very basic file and directory structure concepts. (You lack basic understanding of the meaning of dot-dot for example.)

You should consider getting a software package to "rip" a web site. It would place all the pages how you need them. (Ask a new question if you want to go that route.) I am assuming what you are doing is "ethical". Ensure that your reproduction of the web site is allowed and/or desired.

Otherwise, you need to learn basic file and directory concepts. I would suggest, create your own simple HTML page which links to other pages in a directory structure. Once you are successful with that, you would be able to "rip" a web site by hand and know where to place each file.

Edit:

Place both HTML-files into one folder. Set the A-HREF to point to the file name you are linking to.

Edit 2.0: How to point to a directory of PDF files:

<a href="../thatdir">PDF files</a>
4
  • I was actually working with forward slashes all along. I made a mistake in my post. In the example I'm talking about, there' s a link on the web page. I want to also have a local copy of that linked-to web page and I want the web page link to point to that local copy. Should be simple enough, right? It's definitely ethical. The main thing is an instructional post made on a message board and the link is to a government document from the 50s.
    – mint man
    Feb 24, 2014 at 14:55
  • Yes, "simple enough". Assuming we are talking only of two HTML-files (no images or other "resources"): Just place both files into one directory and link from one to the other. You need only set the A-HREF to point to the file name. Feb 24, 2014 at 16:03
  • I would prefer to make it a bit more complicated. Let me use another example. A page with about 500 PDFs. I saved the page with the intention of makingf it a functional index of the PDFs, all of which I saved. So my intention is to have a group of files that consists of the saved web page, the saved web page's files folder, and a folder that contains the 500 PDFs. And as you probably know, I simply want all the links on the saved web page to point to that folder. For some reason I had great difficulty accomplishing that and am still in the dark.
    – mint man
    Feb 24, 2014 at 16:19
  • Pointing to a directory is also "simple enough". <a href="../thatdir">PDF files</a> You need to tell us exactly what you want to achieve and exactly what you have tried and exactly what happened. We need more than "the wierdest thing happened" and more than "I had great difficulty". I would suggest you redo the whole question and open a new one... Feb 25, 2014 at 7:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .