fixed redirects to / when running in a subdirectory