Further fixes for subfolder hosting
Merge branch 'subfolder_fixes'