surtarso / single-file-php-file-browser

Beautify the default HTML directory listing with a single file.
3 stars 3 forks source link

fix DL paths #3

Closed ZweiEuro closed 2 months ago

ZweiEuro commented 2 months ago

The download paths do not look accurate when using a relative subdirectory to list its contents. This PR sets the download link relative to the current script location on the global server-root; making it more resiliant. The rest of the paths are uneffected (just renamend to relpath)

surtarso commented 2 months ago

I noticed the double bars "//" on download links and wasn't being able to fix it. Thanks a lot! Since the downloads worked anyway I didn't give it too much attention.

ZweiEuro commented 2 months ago

@surtarso Yes they work anyways, but not through something like an nginx reverse proxy. For me, my proxy instantly threw a 404 as it can't resolve a '//' link at all.

Glad I could help!