Web Servers on Unix and Linux - Httpd Redirectiion Question ?

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > June 2004 > Httpd Redirectiion Question ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Httpd Redirectiion Question ?
mitra

2004-06-11, 5:46 pm

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
Klaus Johannes Rusch

2004-06-11, 5:46 pm

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/
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com