This is a discussion on Httpd Redirectiion Question ? within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi, I am new to httpd and apache. I just wanted to know... 1) Whenever the httpd gets an html ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I am new to httpd and apache. I just wanted to know... 1) Whenever the httpd gets an html page/data. I want the entire data/page to be redirected to my function (ie my code). How do i do it ?. 2) if it is a get/post message i want to give some message back to the "process" that sent the message (data). How do i do it ? What i want to do is "my code should process the message". once i process the message. i want "my code" to give the message back to httpd which in turn sends the reply to the request. I want to program (ie the function to be written in C) as i am profiecient with that language. I just wanted to know, if this can be done in apache/httpd. I dont want to modify the source code of httpd/apache. Can i do it without modifying the source code ?. I know perl/PHP are used for the above purpose ?. But I dont know how to do it. I am a novice. I have gone through httpd.conf and already confused with it. Kindly, Advice me. It would be very helpful if you give an detailed answer with some examples. Surfing the Net also did not help as the information available could not be understood by me. Please Advice. Thank you for your time. Regards, mitra |
|
|||
|
mitra wrote:
> 1) Whenever the httpd gets an html page/data. I want the entire > data/page > to be redirected to my function (ie my code). > > How do i do it ?. The configuration directive for Apache is ScriptAlias (there are other ways to enable a directory to contain scripts, see the Apache documentation for details), for example ScriptAlias /cgi-bin /home/www/cgi-bin > 2) if it is a get/post message i want to give some message back to > the > "process" that sent the message (data). > > How do i do it ? The Web server passes information about the request and POST data in a stanardized way, and expects a response in a certain format. See the Common Gateway Interface (CGI) specification at http://hoohoo.ncsa.uiuc.edu/cgi/ for details on what you get and how to return a response. -- Klaus Johannes Rusch KlausRusch@atmedia.net http://www.atmedia.net/KlausRusch/ |