Set redirection path automatically.