That is how urls work. If they start with a “/“ then they are from the root, if not they are relative. The browser does this.
site root relative url
George Andrews
1
Reputation point
I have set IIS 10 (win 11) to test a local site where paths are relative to site root, e.g. /folder/file.html
When I open the home page in a browser, located at http://localhost/asmatron/
and click a link in there, structured like
<a href="/folder/file.html">a page</a>
I get a 404 error because the url IIS is looking for is http://localhost/folder/file.html
instead of http://localhost/asmatron/folder/file.html
Am I missing some setting in IIS or what?
2 answers
Sort by: Most helpful
-
-
George Andrews 1 Reputation point
2021-11-20T16:27:54.713+00:00 Does that mean that my localsite's root is localhost and not localhost/asmatron?