Skip to main content

Django Middleware that can automatically remove trailing URL slashes and 301 redirect to the non-slash-terminated URL.

Project description

Latest Version Build Status Downloads License

This middleware provides the inverse of the Django CommonMiddleware APPEND_SLASH feature. It can automatically remove trailing URL slashes and 301 redirect to the non-slash-terminated URL. This behavior is performed if the initial URL ends in a slash and is invalid, removing the trailing slash produces a valid URL, and REMOVE_SLASH is set to True. Otherwise there is no effect.

For example, foo.com/bar/ will be redirected to foo.com/bar if you don’t have a valid URL pattern for foo.com/bar/ but do have a valid pattern for foo.com/bar and REMOVE_SLASH=True.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-unslashed, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size django-unslashed-0.3.0.tar.gz (7.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page