Alternative querystring - using / instead of ? and &

Alternative querystring - using / instead of ? and &

am 13.02.2007 19:19:16 von royend

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=footb all

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.

Every advice appreciated.
Thanks.

Re: Alternative querystring - using / instead of ? and &

am 13.02.2007 22:04:42 von Dave Anderson

royend@gmail.com wrote:
> 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=footb all
>
> 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).



--
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.

Re: Alternative querystring - using / instead of ? and &

am 14.02.2007 01:58:26 von 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.





wrote in message
news:1171390755.977309.236970@k78g2000cwa.googlegroups.com.. .
> 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=footb all
>
> 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.
>
> Every advice appreciated.
> Thanks.
>

Re: Alternative querystring - using / instead of ? and &

am 14.02.2007 14:47:31 von Dave Anderson

"Farshad Hemmati" wrote:
> PS. Don't use the 404 rewrites, because the user will actually
> be redirected which will show an ugly URL when this happens.

Unless, of course, you only care about the URL working, and not whether it
looks pretty.

And can we finally let the whole notion of "ugly URLs" go? I agree that
there are times when a simple, uncluttered URL is ideal -- our marketing
department uses them in print, for example -- but your browser does not
care.

Besides - ugly is in the eye of the beholder. Which of these do you prefer
(the first redirects to the second)?

http://aspfaq.com/show.asp?id=2109
http://classicasp.aspfaq.com/general/why-do-i-get-a-500-inte rnal-server-error-for-all-asp-errors.html

My vote is for the one with the querystring, since I am probably pasting it
into a message of some sort. But the second contains more wetware-readable
information, so perhaps others prefer the second.

So, which one is ugly?



--
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.

Re: Alternative querystring - using / instead of ? and &

am 14.02.2007 16:50:52 von exjxw.hannivoort

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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)