Question

I have been working on a local website for awhile now, but I can't figure out how to link the html files I have created together so that viewers on other computers can click through them like a website.

I am building the site on my own computer, but have two other people who I want to send the files to. I can link the html pages together so they click through fine on my computer, but when I send them to the other people, the links don't work.

I imagine this is just a simple solution, but I can't seem to find it anywhere. Any help is much appreciated.

Était-ce utile?

La solution

(1) Assuming you have all html files in a single folder, e.g. "somefolder" and you used

<a href="C:\somepath\somefolder\filename.html">

to reference other html files, then just replace it with a relative path:

<a href="filename.html">

(2) If you sent the pack of html pages as an archive, then it has to be extracted completely for links to work.

Autres conseils

I think, your links are in the form C:\Users\Username\... etc. You should replace these absolute paths by relative paths.

See this answer: https://stackoverflow.com/a/22375071/2321643

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top