Forum Moderators: phranque
whatever.com/solutions/anyfile.php RewriteEngine on
RewriteRule ^media/ - [L]
RewriteRule ^g2data/ - [L]
RewriteCond %{REQUEST_FILENAME} !/django.cgi.*
RewriteRule ^(.*)$ /django.cgi/$1 [L]
RewriteRule ^$ /django.cgi
#
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
http://whatever.com/solutions/anyfile.php You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
RewriteEngine on
#
# Rewrite all requests to /django.cgi, with the originally-requested URL-path appended as path-info,
# excluding the specified directories (Note that the second RewriteCond prevents an infinite loop)
RewriteCond $1 !^django\.cgi
RewriteCond $1 !^(media|g2data|solutions)/
RewriteRule ^(.*)$ /django.cgi/$1 [L]