|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Web programming in C question.
In ruby on rails, you can send requests to certain functions of the program depending on what the URL is, and you can put information to send to the function in the URL. For example...
.com/profile/18 In one program, that request could be sent to the view profile function, and the 18 can be sent as the ID of the profile to view. I believe you can also do this same thing with Java servlets. Is there anything that will do this with CGI programs in C? Something that allows me to route request that I want, but will still allow Apache to handle the request that I don't want to handle? The routing to different functions part isn't so important, I more want to be able to put information into the URL. Thank you. |
|
#2
|
||||
|
||||
|
Yes you can do this, but not as a CGI program. For this, you would want to write an Apache module and hook to the URI Translation event or Header Parsing event and then you can work from there. Note that an apache module works way faster than a CGI does. Matter of fact, it is often faster than serving a static page!
IIS has a similar feature where you can write an ISAPI dll which can hook to the event and work from there.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
|
#3
|
|||
|
|||
|
After I posted this I started reading about Apache modules, but I was hoping I wouldn't have to write one. Well at least now I know where I gotta start. Thanks!
|
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Web programming in C question. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|