Skip to content

Instantly share code, notes, and snippets.

@ionelmc
Created February 20, 2013 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ionelmc/4996847 to your computer and use it in GitHub Desktop.
Save ionelmc/4996847 to your computer and use it in GitHub Desktop.
Serve from static dir, if file not found forward request to modwsgi app
WSGIScriptAlias /wsgi /home/blabla/app.wsgi
RewriteEngine on
#RewriteLogLevel 9
#RewriteLog "/var/log/apache2/rewrite.log"
RewriteCond /home/blabla/www%{REQUEST_FILENAME} !-f
RewriteCond /home/blabla/www%{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(static|media)
RewriteRule ^(.*)$ /wsgi$1 [PT,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment