Newbie, who just doesn't get it

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 5
Joined: 13 Feb 2014, 11:50

Newbie, who just doesn't get it

13 Feb 2014, 11:55

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

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Newbie, who just doesn't get it

14 Feb 2014, 13:25

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

User avatar
Posts: 5
Joined: 13 Feb 2014, 11:50

Re: Newbie, who just doesn't get it

14 Feb 2014, 14:18

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.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Newbie, who just doesn't get it

17 Feb 2014, 10:07

So, do you say, that whatever querystring parameter you have there, you don't care, right? Just remove it?

User avatar
Posts: 5
Joined: 13 Feb 2014, 11:50

Re: Newbie, who just doesn't get it

18 Feb 2014, 06:38

Yeah, as long as there variables being passed can still be acted upon.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Newbie, who just doesn't get it

18 Feb 2014, 10:06

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.

User avatar
Posts: 5
Joined: 13 Feb 2014, 11:50

Re: Newbie, who just doesn't get it

18 Feb 2014, 10:25

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.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Newbie, who just doesn't get it

18 Feb 2014, 11:45

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.

User avatar
Posts: 5
Joined: 13 Feb 2014, 11:50

Re: Newbie, who just doesn't get it

18 Feb 2014, 13:54

Hmm, rats!

Not the answer i was hoping for. But thanks for the time you've taken in answering me.
JD

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 0 guests