fix some bugs about the url redirecting to 404