Django official documentation and other tutorials on the web always use a trailing slash at the end of url. ex:
url(r\'^accounts/login/\', views.login) # lo
"URLs should be beautiful"!!! I want to be able to control URLs. It's nothing nice when everything is about to be overwritten. Under circumstances, I make a redirect loop which is not funny.
from django.http import HttpResponseRedirect as rdrct
url(r'^sitemap.xml$', 'my_app.views.custom_sm'),
url(r'^sitemap.xml/$', lambda x: rdrct('/sitemap.xml')),