Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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} =www.moublemouble.com [NC, OR]
RewriteCond %{HTTP_HOST} =moublemouble.com [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
1  
what tutorial did you read? –  warren Oct 7 '09 at 7:22
add comment

1 Answer

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} ^www.moublemouble.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^moublemouble.com$ [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
add comment

Your Answer

 
discard

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