Example in this problem we need redirect the url http://localhost:8000/a/b/C/123/4/5/ to http://localhost:8000/abC12345 without / slash. 1. In your views.py from django.http import HttpResponse from django.views.generic.base import RedirectView from django.core.urlresolvers import ...

Django: Redirect HTTP to HTTPS, basically the Django already support to handle this redirection at https://docs.djangoproject.com/en/dev/topics/security/#ssl-https Edit in your settings.py # Redirecting from `HTTP` to `HTTPS` for Django 1.8 or ...