Redirect to no slash
The canonical notion of urls ending in slashes dates from a web where urls were used to access documents and files this is no longer the case so keeping your urls witouth trailing slashes makes them prettier. The problem is that many people/blogs/spiders/browsers could end up with a url with slashes which can be problematic for you SEO, or confuse users. This script is for sites with no trailing slash dicipline in their urls, and to prevent everybody getting a horrible 404 for a simple slash you just got to remove it and issue a permanent redirect (301) and you'll get your pretty urls your cake and eat it too. I must stress, you will have to edit all your public urls removing the slashes like so: url(r'^login$', login,} If you forget, to edit them and visit the url, your browser will remember the redirect and you'll have to clean the browsing history to fix it.
- permanent redirect
- no slashes
- no slash