Posted By: itprochris | Jan 2nd, 2006 @ 7:30 PM
page 1 of 1
Comments: 4 | Views: 2072
itprochris
itprochris
Holiday Avatar made with C9IAC
How do some sites have paths like "bob/default.aspx/hello/?id=1"? And also how is it possible to have a path with a querystring but no extension? Like "\bob?id=1"?

Thanks,

Chris:O
abs
abs
xml me
Hi Chris.

There are two ways.

First, "bob" could be an executable file - runnning on a UNIX system.
Second, "bob" could be a folder, and therefore "\bob?id=1" means that id=1 is passed into the default file in the folder "bob".
blowdart
blowdart
Peek-a-boo
itprochris wrote:
How do some sites have paths like "bob/default.aspx/hello/?id=1"?


Oh that ones is simple. the / after .aspx marks it as a parameter, so the page is passed to the asp.net pipeline, and you can nab the parts after the .aspx by parsing the raw url;

Request.RawUrl.Substring(Request["URL"].Length);
W3bbo
W3bbo
The Master of Baiters
blowdart wrote:
itprochris wrote:How do some sites have paths like "bob/default.aspx/hello/?id=1"?


Oh that ones is simple. the / after .aspx marks it as a parameter, so the page is passed to the asp.net pipeline, and you can nab the parts after the .aspx by parsing the raw url;

Request.RawUrl.Substring(Request["URL"].Length);


Or just Request.Querystring()

There's also URL rewriting.

The HTTP specification makes no distiction of anything after the hostname or before the querystring. That URL substring is called the "Requested Resource", what it returns is up to the HTTPD.
page 1 of 1
Comments: 4 | Views: 2072
Microsoft Communities