Newbie, who just doesn't get it
9 posts
• Page 1 of 1
Newbie, who just doesn't get it
I'm hopeless with regular expressions, but I would like to rewrite urls so that session variables being passed continue to be effective, but are not visible in the address bar. ie http://localhost:8080/Page2.aspx?a=test&b=1 appears as http://localhost:8080/Page2.aspx or http://localhost:8080/Page2.
I'm hoping someone can write me an expression or two to accomplish this and spare my scalp further hair pulling.
JD
I'm hoping someone can write me an expression or two to accomplish this and spare my scalp further hair pulling.
JD
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Newbie, who just doesn't get it
IT's going to be hard, since we need something in the "pretty" URL to say if the value of "a" or "b" are such and such.
So the final URLs dhould have the following format: test/1//page2.aspx. Would that be something you want?
Regards
So the final URLs dhould have the following format: test/1//page2.aspx. Would that be something you want?
Regards
Re: Newbie, who just doesn't get it
Thanks for replying.
Ideally, there'd be no sign of parameters in the url.
Is there a way to capture those parameters, use them in the page2.aspx, but only display 'Page2.aspx' in the address bar? The format of what prefixes the 'Page2.aspx' is not a concern.
Ideally, there'd be no sign of parameters in the url.
Is there a way to capture those parameters, use them in the page2.aspx, but only display 'Page2.aspx' in the address bar? The format of what prefixes the 'Page2.aspx' is not a concern.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Newbie, who just doesn't get it
So, do you say, that whatever querystring parameter you have there, you don't care, right? Just remove it?
Re: Newbie, who just doesn't get it
Yeah, as long as there variables being passed can still be acted upon.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Newbie, who just doesn't get it
I'm afraid we didn't understand each other. The idea behind the rules you want is that it consists of 2 parts: 1. redirect to a new URL (transform URL in the browser) 2. Based on a new URL point the pretty URl to a correct destination.
So, once we modify Page2.aspx?a=test&b=1 to Page2.aspx, we do not have parameters anymore. So ISAPI_Rewrite doesn't know which page to load, it will load a blank page2 page. Which brings us back to the question above.
So, once we modify Page2.aspx?a=test&b=1 to Page2.aspx, we do not have parameters anymore. So ISAPI_Rewrite doesn't know which page to load, it will load a blank page2 page. Which brings us back to the question above.
Re: Newbie, who just doesn't get it
HeliconAndrew wrote:So, once we modify Page2.aspx?a=test&b=1 to Page2.aspx, we do not have parameters anymore.
So how can the parameters persist, without appearing in the address bar? that's the essence of what i want to achieve.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Newbie, who just doesn't get it
No, they can't. You need to at least, leave the values like: test/1/page2.aspx or /page2.aspx/1/test, or something like this.
Re: Newbie, who just doesn't get it
Hmm, rats!
Not the answer i was hoping for. But thanks for the time you've taken in answering me.
JD
Not the answer i was hoping for. But thanks for the time you've taken in answering me.
JD
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests