modify path for relative path redirection