Fix redirection in js when pageType != item should redirect to root, directory root/pathname may not exist on the new blog