473,398 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 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 3706
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=<%= Request.QueryString("cadd2") %>&cplace=<%=...
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 querystring in the url EG: ...
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 about the '&amp;'. I thought the ampersand (&)...
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 purposes /Program Files/). Some users use an ampersand...
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 fails to capture the values if "&amp;" is specified....
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 DataNavigateUrlFormatString I am able to include one of the values...
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 System.Web.HttpContext class. 1) For accesing session variables :...
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. Rather than have multiple entries in the web.config...
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" + @"&email=raerwe@fred.com" + @"&verify=32423dasdf3"); ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.