IIRF URL Rewriting with monorail

15 views
Skip to first unread message

Sean Chambers

unread,
Dec 30, 2007, 12:45:03 PM12/30/07
to Castle Project Users
I am trying to get IIRF to work with MR and am having some problems
with getting 404 errors.

The rules are rewriting to the proper location, ie. ^/register.aspx
to /register/index.aspx. The problem is that asp.net is throwing a
404 error since /register/index.aspx doesn't actually exist. If I
remove the filter from IIS the /register/index.aspx URL works again.
I'm convinced that I am just missing a base rule in the filter or
something. Here is the rewrite I am trying to get to work:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/register.aspx /register/index.aspx [U,I,L]

I also tried without the conditions with the same outcome. Anyone else
get IIRF to work with MR?

Thanks!

Sean

josh robb

unread,
Dec 30, 2007, 1:02:36 PM12/30/07
to castle-pro...@googlegroups.com
On Dec 30, 2007 5:45 PM, Sean Chambers <dko...@gmail.com> wrote:
> The rules are rewriting to the proper location, ie. ^/register.aspx
> to /register/index.aspx. The problem is that asp.net is throwing a
> 404 error since /register/index.aspx doesn't actually exist. If I
> remove the filter from IIS the /register/index.aspx URL works again.
> I'm convinced that I am just missing a base rule in the filter or
> something. Here is the rewrite I am trying to get to work:

Have you tuned off the check if file exists option in the IIS script
engine config?

Mike Nichols

unread,
Dec 30, 2007, 1:28:56 PM12/30/07
to Castle Project Users
Could it be because you are missing the end-string character ($) ?
So this:
RewriteRule ^/register.aspx /register/index.aspx [U,I,L]

should be this:
RewriteRule ^/register.aspx$ /register/index.aspx [U,I,L]

I used IIRF on my first monorail app and it worked fine.

Mike Nichols

unread,
Dec 30, 2007, 2:56:11 PM12/30/07
to Castle Project Users
Sean -
I got your email from code plex but didn't have an email to reply
to...
If you want to ping me I can send you the IIRF config I have for my
monorail app. It was my first time using an ISAPI filter but maybe
it'll help.
Also, do you have logging enabled? The logging for IIRF is pretty
helpful.

Mike


On Dec 30, 10:45 am, Sean Chambers <dko...@gmail.com> wrote:

Sean Chambers

unread,
Dec 30, 2007, 10:17:20 PM12/30/07
to Castle Project Users
ya know,

after glancing at my iis config once again I noticed that iis reset
the base directory to wwwroot instead of my application root. Couple
that with the fact that it was very late and wasn't thinking
straight... recipe for stupidity!!

thanks for your help, it is greatly appreciated!

Sean
Reply all
Reply to author
Forward
0 new messages