How can I redirect traffic that does not match any of my other URLs to the home page?
urls.py:
urlpatterns = patterns('', url(r'^$', 'macmonster.views.home'), #url(r'^macmon_home$', 'macmonster.views.home'), url(r'^macmon_output/$', 'macmonster.views.output'), url(r'^macmon_about/$', 'macmonster.views.about'), url(r'^.*$', 'macmonster.views.home'), )
As is, the last entry sends all the βotherβ traffic to the home page, but I want to redirect through HTTP 301 or 302 .
python django django-urls
PacketPimp Feb 19 '13 at 13:54 2013-02-19 13:54
source share