fix URLs created in hooks (i.e. include subdirectory)