[Bugfix] fix static URL detection when running in a subdirectory and not webroot.