Using mod_mono with mod_rewrite under apache2 on Linux

I encountered a curious problem today and I would like to share the solution for anybody else who is experiencing it.

There seems to be a bug in trunk/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs on Mono whereby mod_mono disregards mod_rewrite's rewrite rules.

The output of my rewrite log indicated that the rewrite was working fine, but mod_mono disregarded this and processed the original URL.

The solution is, in all simplicity, to add the [PT] flag to your rule:

RewriteRule ^/(?!Default)([^\./]+)\.aspx /Default.aspx?action=$1 [PT,L]

add a comment
name:
website:
email:
comment: