I am trying to use Apache's Rewrite module to redirect users before Django catches the request. I tried the following to redirect a user from "test.php" to the "links" page
<VirtualHost 10.0.0.3> WSGIDaemonProcess mydomain.com processes=1 threads=15 display-name=$ WSGIProcessGroup mydomain.com DocumentRoot "/home/james/www" <Directory "/home/james/www"> Options +FollowSymlinks RewriteEngine On RewriteRule ^test.php links [NC,R=301,L] Order allow,deny Allow from all </Directory> WSGIScriptAlias / "/home/james/www/app.wsgi" ServerName mydomain.com </VirtualHost>
This approach does not work (when navigating to mydomain.com/test.php it does not redirect me to the "links" page, which does exists).
Is there a way to implement a Rewrite with mod_wsgi?