serve-handler icon indicating copy to clipboard operation
serve-handler copied to clipboard

Wrong redirect that cause wrong relative links interpolation on html files

Open krzysztofpniak opened this issue 5 years ago • 2 comments

it redirects urls like: http://localhost:8000/abc/def/index.html to http://localhost:8000/abc/def if index.html contains links like <a href="file.html">File</a> browser resolves that links like: http://localhost:8000/abc/file.html instead of http://localhost:8000/abc/def/file.html

actual behaviour: redirects http://localhost:8000/abc/def/index.html to http://localhost:8000/abc/def expected behaviour: redirects http://localhost:8000/abc/def/index.html to http://localhost:8000/abc/def/

I compared it to for example SimpleHTTPServer from python, and it works correctly.

krzysztofpniak avatar Mar 13 '19 11:03 krzysztofpniak

You should try

  • python -m http.server 8000
  • open it on different browser

mohamedsgap avatar May 04 '19 23:05 mohamedsgap

cleanUrls + trailingSlash is a dangerous combination of config options, which will break relative links

warren-bank avatar Feb 16 '22 01:02 warren-bank