views:

27

answers:

1

Using ManagedFusion's URL rewriter, I have the following code. When requesting / on the Visual Studio development server, I get a redirect loop, however the same code works on a production IIS server when I upload the site to it... why is this? I have <defaultDocument enabled="false"/> in the web.config.

RewriteRule ^/(Default|index|home)(\.[\w]+)?/?$ / [NS,NC,R=301,L]
RewriteRule ^/$ /Default.aspx [L]
A: 

The current URI might be changed during the rewriting process. Inspect the request line of the HTTP request in THE_REQUEST to get the original requested URI path and query:

RewriteCond %{THE_REQUEST} ^[A-Z]+\ /(Default|index|home)(\.\w+)?/?[?\ ]
RewriteRule ^/(Default|index|home)(\.\w+)?/?$ / [NS,NC,R=301,L]
RewriteRule ^/$ /Default.aspx [L]
Gumbo
The same problem occurs with this code. Perhaps it is a bug in the ManagedFusion URL rewriter.
Jake Petroules