I have a static html website in a folder on Windows XP. If I open the file directly from its location, the page loads in a browser, but none of the relative links work. They all want to be relative to localhost, not the directory they’re in.
I can drop the project in IIS and it works fine, but I’d like to be able to skip that step and just browse the project without needing a server.
But my question is simply this: is there something I can do so I can view the website locally, through a browser, without a server?
Thanks.
<base>Defines the base URL or target for all relative links.It goes in the
<head>tag.It can also be useful for developers who build websites in one location (dev) that will ultimately be placed in another location (prod).
There is some discussion — and some more examples for you — in this SO question.