473,544 Members | 1,959 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3715
ro****@gmail.co m 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.c omwrote in message
news:11******** **************@ k78g2000cwa.goo glegroups.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.publi c.inetserver.as p.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
17279
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=<%= Request.QueryString("cplace") %>">Click</a> Suppose the names in the above querystring have the following values: cname="Danny" cadd1="House 97"
4
3007
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: /mypage.asp?value1=1&amp;value2=4&amp; ... which of course means nothing to asp.
3
3918
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 (&) signaled another variable in the querystring - but apparently not in this case? BG=%23efefef&amp; Here's the entire querystring: <form name="Form1"...
1
2914
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 ("&") in both folder and file names. This has caused me some real grief! I'm not in a position to tell the users it's an ID 10 T error and they have...
4
9476
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. e.g. http://myserver/test.aspx?pid=1&amp;did=2 http://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2 Any ideas?
2
10592
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 which comes from the database to make a link with the syntax http://server/work_order.asp?WorkOrder=12345678&Site=NYC but I cannot get the NYC...
0
4998
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 : System.Web.HttpContext.Current.Session 2) For accesing Application variables : System.Web.HttpContext.Current.Application 3) For accesing QueryString...
0
978
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 file, I thought I'd instead create an HttpHandlerFactory that would analyze the path information and then hand over the rest of the content...
3
2972
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"); Renders this: <input name="return_ok" type="hidden" id="return_ok"...
0
7387
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7798
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7738
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5956
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4938
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1862
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
688
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.