472,338 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,338 software developers and data experts.

Alternative querystring - using / instead of ? and &

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

instead of the usual method:
http://www.mysite.com/article.asp?ca...egory=football

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

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

Every advice appreciated.
Thanks.

Feb 13 '07 #1
4 3631
ro****@gmail.com wrote:
Hi.
Is is possible to pass parameters with this URL:
www.mysite.com/article/sports/football

instead of the usual method:
http://www.mysite.com/article.asp?ca...egory=football

And, if I need to add more parameters at a later time, may I then use
something like:
http://www.mysite.com/article/sports...21&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.
Feb 13 '07 #2
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.

<ro****@gmail.comwrote in message
news:11**********************@k78g2000cwa.googlegr oups.com...
Hi.
Is is possible to pass parameters with this URL:
www.mysite.com/article/sports/football

instead of the usual method:
http://www.mysite.com/article.asp?ca...egory=football

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

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

Every advice appreciated.
Thanks.

Feb 14 '07 #3
"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...sp-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.

Feb 14 '07 #4
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)
Feb 14 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Arpan | last post by:
A link has the following URL: <a href="Page1.asp?cname=<%= Request.QueryString("cname") %>&cadd1=<%= Request.QueryString("cadd1") %>&cadd2=<%=...
4
by: Luklrc | last post by:
Hi, I'm having to create a querysting with javascript. My problem is that javscript turns the "&" characher into "&amp;" when it gets used as a...
3
by: Jeremy | last post by:
I'm trying to understand the following part of a QueryString value: What does the %23 mean? I presume that the 'efefef' is a color (RGB) value. What...
1
by: EoRaptor013 | last post by:
Not sure where to ask this question, but... I'm using a TreeView component to enable browsing file folders in a specific directory (for test...
4
by: | last post by:
Hi all, If I am reading this right, then the querystring parameters must be "&amp;" and not "&". However, IIS 6.0 and asp.net request.querystring...
2
by: Ixnay | last post by:
Thanks in advance for any help you can give me on this. I am trying to include the value from a request.querystring in the...
0
by: bharathreddy | last post by:
Here I will given an example on how to access the session, application and querystring variables in an .cs class file. Using...
0
by: Random | last post by:
I'm using a set of HttpHandlers in my site to parse out the path and write content based on information in that path, including the querystring....
3
by: Tom | last post by:
Trying to build a querystring using Attributes.Add: return_ok.Attributes.Add("value", "http://mydomain.com/finish.aspx?finish=324234" +...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.