Alternative querystring - using / instead of ? and &

D

Dave Anderson

Hi.
Is is possible to pass parameters with this URL:
www.mysite.com/article/sports/football

instead of the usual method:
www.mysite.com/article.asp?category=sports&subcategory=football

And, if I need to add more parameters at a later time, may I then use
something like:
www.mysite.com/article/sports/football/?id=321&language=EN

Also, I am using ASP, not ASP.NET.

You can use a custom 404 handler to parse requests in the manner you desire.
We used to do this a lot when our company used GroupWise instead of Outlook
(GroupWise apparently didn't know what a querystring was until a couple of
years ago, but didn't mind URLs with long paths).
 
F

Farshad Hemmati

The best way to do this is to use an ISAPI filter. There are a few free ones
out there, but I personally bought ISAPI_Rewrite which works really well and
is stable.

You can find it at:
http://www.helicontech.com/

If you search for "ISAPI URL rewrite" on google, you will find a few free
ones. If you couldn't find one, reply to this and I'll find you the free
ones as well. But I recommend the above one because it is more stable with
heavier loads.

PS. Don't use the 404 rewrites, because the user will actually be redirected
which will show an ugly URL when this happens.
 
E

Evertjan.

Farshad Hemmati wrote on 14 feb 2007 in
microsoft.public.inetserver.asp.general:
PS. Don't use the 404 rewrites, because the user will actually be
redirected which will show an ugly URL when this happens.

But, as I do and you [general] should,
you use bitstream or server.transfer,
the original URL-string will be shown where no actual file exists.

All my pdf files are virtual,
as I first want to count, look at the referrer,
and then send the pdf bitstream with proper headers.

The same goes for nonexisting img-s where a standart jpg is shown
on some of my websites.
 

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

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top