Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've read this tutorial about how to modify your .htaccess in order to server many web2py applications but it doesn't seem to work. Here is my .htaccess

RewriteEngine On

RewriteRule ^dispatch\.fcgi/ - [L]
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]

RewriteCond %{HTTP_HOST} [NC, OR]
RewriteCond %{HTTP_HOST} [NC]
RewriteRule ^/(.*) /moublemouble/$1 [PT,L]

All I get is a 500 Internal Error and .htaccess is not my strong point. Any clues?

share|improve this question
what tutorial did you read? – warren Oct 7 '09 at 7:22

The syntax for RewriteCond uses regular expressions that are matched against some string. You are trying to use some x = y syntax that is completely unsupported.

Thus your last three lines should look something like this:

RewriteCond %{HTTP_HOST} ^$ [NC,OR]
RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteRule ^/(.*) /moublemouble/$1 [PT,L]

But please note that I only looked at the syntax and not the semantics of your rules.

share|improve this answer
I am getting 'RewriteCond: bad flag delimiters' on the error logs. Any other ideas? – Jon Sep 22 '09 at 10:12
With what syntax? Mine or yours? – innaM Sep 22 '09 at 10:56
I've removed the space between "NC," and "OR". The list of flags is comma-separated, not comma-space-separated. – innaM Sep 22 '09 at 10:57
It doesn't throw an error now but it doesn't do what it has to do – Jon Sep 22 '09 at 18:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.