Posted By: aonarres | Jul 25th @ 1:01 AM
page 1 of 1
Comments: 1 | Views: 373

Hello,

I have created a HttpModule for that when www.my page.com/section/A/ is requested, the page http://www.mypage.com/section/?P1=A is show,but i don't want that the navigator direction changes. I use RewritePath.

When the direction is www.my page.com/section/index.aspx/A/ the direction doesn't change and the showed page is correct.

But when it is www.my page.com/section/A/ appears www.mypage.com/section/?P1=A.

This can be because section/index.aspx is the real page, but section/A/ no.

I don't know like doing it.

Thanks for your help.

Regards.

In your Page.Load event (preferably in a "BasePage" superclass) add this line:

Context.RewritePath( System.IO.Path.GetFileName( Request.RawUrl ) );

That will reset the internal path for things like ResolveUrl and ResolveClientUrl but without affecting how the site fundamentally works.
page 1 of 1
Comments: 1 | Views: 373