UrlRewrintg and Server.Tranfer

F

fabrice

Hello,

I have got a little problem with Url Rewritig process and server.transfer
use.
I would like to create a simple url rewriting process for my web site
I use in a lot of pages, the "server.transfer" property to go to one page
to another one.

In this process, I use the global.asax with Application_BeginRequest Sub.
I need to catch the whole url with querystring if exists.
First, I have used the property : HttpContext.Current.request.RawUrl.

--> I can't use " HttpContext.Current.Request.CurrentExecutionFilePath "
because there is not the querystring.

But, my problem, by using server.transfer property is that I get always the
old page url. And my Url Rewriting process doesn't work fine.


..... I don't know how to solve my problem.


Example

First URL
http://test.intranet.com/file1/page1.aspx

Request Path gives me file1/page1.aspx
In my application the user cliks on a button and Server.Transfer occurs.
There is a transfer to the new page " /file2/page2.aspx

But with Application_BeginRequest in global.asax, "Request Path" gives me
always file1/page1.aspx and not file2/page3.aspx
I get the old URL.

There is a way to get the right URL for Url Rewriting process (using
global.asax and Application_BeginRequest ) with querystring (if querystring
exists) by using server.transfer in my website.

Thanks a lot for your help.

fabrice
 

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,770
Messages
2,569,586
Members
45,093
Latest member
EmiliaAlfo

Latest Threads

Top