Redirecting to Fermat's principle