How do I redirect domain.com to WWW.domain.com under Django?
How do I go about redirecting all requests for domain.com/... to **www**.domain.com/... with a 301 in a django site?

Obviously this can't be done in urls.py because you only get the path part of the URL in there.

I can't use mod rewrite in .htaccess, because .htaccess files do nothing under Django (I think).

I'm guessing something in middleware or apache conf?

I'm running Django on a Linux server with Plesk, using mod WSGI
How do I redirect domain.com to WWW.domain.com under Django?
===

How do I go about redirecting all requests for domain.com/... to **www**.domain.com/... with a 301 in a django site?

Obviously this can't be done in urls.py because you only get the path part of the URL in there.

I can't use mod rewrite in .htaccess, because .htaccess files do nothing under Django (I think).

I'm guessing something in middleware or apache conf?

I'm running Django on a Linux server with Plesk, using mod WSGI