471,072 Members | 1,364 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,072 software developers and data experts.

UrlRewrintg and Server.Tranfer


I have got a little problem with Url Rewritig process and server.transfer
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.CurrentExecutionFilePa th "
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.

If I use HttpContext.Current.Request.CurrentExecutionFilePa th property
in a SUB LOAD .aspx page, i get the right path. But not the queryString. If I use HttpContext.Current.Request.CurrentExecutionFilePa th in
Application_BeginRequest Sub, I get the old url page.
If I use HttpContext.Current.request.RawUrl in Application_BeginRequest
(or in SUB LOAD .aspx page), I get the querystring but the old page url.

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

First URL

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.

Feb 3 '06 #1
0 1010

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Russ | last post: by
3 posts views Thread by srikirti | last post: by
1 post views Thread by BrandonN | last post: by
2 posts views Thread by bbawa1 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.