append default.aspx to a URL

Oct 1, 2007 at 4:23 PM
Hi, please can you help me?

I've read the other article related to this but was unable to find an relevent example in the sample files.

My site currently has pages like
etc etc

I'd like to make the IsapiRewrite4.dll append "default.aspx" or "/default.aspx" to the end of the incoming URLs.

Can you please show me how this is done. I'd be extremely grateful if you could show me the RegExp, as my knowledge of such things is limited.

Many thanks

Oct 10, 2007 at 10:18 PM
Edited Oct 10, 2007 at 10:25 PM

This rule allows the appends a trailing slash if they forget to enter one.
RewriteRule ^/([^.?]+[^.?/])$ /$1/ [R=301]

These two rules should take care of the cases you specified above. These are case-insensitive.
RewriteRule ^/(?i)home(?-i)/$ /home/default.aspx
RewriteRule ^/(?i)home/links(?-i)/$ /home/links/default.aspx