A Server page execution (hiding the real URL) question

C

Chris Hohmann

Karim Dahdah said:
Hi everybody,

I'm looking for a solution for the following problem:

I created ASP code to convert an URL such as:
http://localhost/mypage/category_20/article_15/
into the following URL:
http://localhost/index.asp?page=mypage&catid=20&articleid=15

Now, the first URL is submitted by the user. The second one is the real URL,
but not visible for the user. This one should be handled by the web server
internally.

I thought I could accomplish this task with server.execute or
server.transfer, but none of them can handle querystrings. Is there another
way to do this?
Are there perhaps any COM objects? (This will be my last choice, because the
whole system should go running on an iASP (instant ASP) server too if
possible)

It is unclear what you mean when you say the second URL is not visible
for the user. I think what you're looking for is Response.Redirect. If
not, and your intension is to mask the second URL, you could use
MSXML2.ServerXMLHTTP to retrieve the contents on the second URL and
output it to the Response of the first URL. Here's an ASPFAQ article:

http://aspfaq.com/2173

HTH
-Chris
 
K

Karim Dahdah

Hi everybody,

I'm looking for a solution for the following problem:

I created ASP code to convert an URL such as:
http://localhost/mypage/category_20/article_15/
into the following URL:
http://localhost/index.asp?page=mypage&catid=20&articleid=15

Now, the first URL is submitted by the user. The second one is the real URL,
but not visible for the user. This one should be handled by the web server
internally.

I thought I could accomplish this task with server.execute or
server.transfer, but none of them can handle querystrings. Is there another
way to do this?
Are there perhaps any COM objects? (This will be my last choice, because the
whole system should go running on an iASP (instant ASP) server too if
possible)

Many thanks for your input!

Best regards,

Karim Dahdah
www.doran.be
 
D

Dave Anderson

Karim Dahdah said:
I thought I could accomplish this task with server.execute or
server.transfer, but none of them can handle querystrings.

Server.Transfer can "handle" querystrings. You just can't add to the
querystring that came with the original request.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 

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

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,087
Members
48,773
Latest member
Kaybee

Latest Threads

Top