# werkzeug.append_slash_redirect¶

werkzeug.append_slash_redirect(environ, code=301)[source]

Redirects to the same URL but with a slash appended. The behavior of this function is undefined if the path ends with a slash already.

Parameters: environ – the WSGI environment for the request that triggers the redirect. code – the status code for the redirect.