Added code to hopefully resolve issue loading error page correctly form sub-dirs