Django AND .htaccess rewrites/redirects, is this possible?

Posted by Infinity on Stack Overflow See other posts from Stack Overflow or by Infinity
Published on 2010-05-27T15:38:31Z Indexed on 2010/05/27 16:21 UTC
Read the original article Hit count: 189

Filed under:
|
|
|

Is it possible to have Apache htaccess rewrites take effect before it hits django?

For example so I can redirect iPhone users to a completely different domain without even hitting django.

We're using apache2 with mod_wsgi and the apache vhost looks like this:

<VirtualHost *:80>

    DocumentRoot /usr/local/www/site/static

    Alias /css/ /usr/local/www/site/static/css/
    Alias /js/ /usr/local/www/site/static/js/
    Alias /img/ /usr/local/www/site/static/img/
    Alias /flash/ /usr/local/www/site/static/flash/

    <Directory /usr/local/www/site/static>
      AllowOverride All
      Order allow,deny
      Allow from all
    </Directory>

    WSGIDaemonProcess mallorca-site threads=15
    WSGIScriptAlias / /usr/local/www/site/config/dev/dev.wsgi

</VirtualHost>

Thanks

© Stack Overflow or respective owner

Related posts about django

Related posts about apache