Hi there,
is it possible to create a rewrite rule to send every server-request
to the directory /py? But only if the file does not exists on the
server.
This is my .conf:
<VirtualHost *>
DocumentRoot /var/www/mydomain.com/htdocs
ServerName mydomain.com
ServerAlias
www.mydomain.com
<Location "/py">
SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonPath "['/var/www/mydomain.com/htdocs/py'] +
sys.path"
SetEnv DJANGO_SETTINGS_MODULE myapp.settings
PythonDebug Off
</Location>
RewriteEngine On
# If its not here...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Look here instead...
RewriteRule (.*) /py$1 [PT]
ErrorLog /var/www/mydomain.com/logs/error.log
CustomLog /var/www/mydomain.com/logs/access.log common
</VirtualHost>
But with that every request is send to /py. Any ideas what could be
wrong?