If a relative URL starts with a /
, it's only relative to the root (the domain). So both
http://stack.com/more/ + /index.html
and
http://stack.com/more + /index.html
are correctly resolved to
http://stack.com/index.html
not
http://stack.com/more/index.html
In your example, it makes no difference whatsoever whether there's a /
at the end of more
.
The trick comes in when there's no leading slash on the relative URL, e.g. index.html
. When resolving those, you're supposed to remove the last segment and replace it with the relative path. It would make a difference in that case, because
http://stack.com/more/ + index.html
resolves to
http://stack.com/more/index.html
but
http://stack.com/more + index.html
resolves to
http://stack.com/index.html
(index.html
replaces more
, because more
is the final segment).