ISAPI rewrite kills postbacks?

D

darrel

We're using ISAPI rewrite on our site.

We have a URL that looks like this:

/district/2/

that gets rewritten to:

/default.aspx?siteID=2

This works. If we have it write out the URL and such, we see this info:

FilePath:/default.aspx
URL:http://localhost/default.aspx?siteID=0
RAWurl:/default.aspx?siteID=0

The problem is that if we trigger a postback, the application can't find
it's own page. Ie, on postback of this page:

/district/2/

we get an error:

"can't find /district/0/default.aspx"

In otherwords, it's looking for /district/0/default.aspx instead of
/default.aspx to reload itself.

One fix is to add a new rewrite rule so that /district/0/default.aspx is
rewritten back to /default.aspx but I'm not sure why I have to do that. It
appears that .net should be seeing the 'real' url but isn't.

-Darrel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top