Solved

configure apache to intercept all requests with a cgi program

Posted on 2002-04-10
3
187 Views
Last Modified: 2010-05-18
Dear experts,

how to configure apache so that when apache receives a request "GET /xyz/index.html with form data", it will intercept this request to a cgi program said "intercept.cgi"??

Thanks!


KC
0
Comment
Question by:kcwang7
  • 3
3 Comments
 
LVL 15

Expert Comment

by:samri
Comment Utility
Try this one out.  You need to have mod_rewrite loaded/enabled

Look in httpd.conf, and make sure these two lines are not commented.  If it is, uncomment, and restart apache.

LoadModule rewrite_module     libexec/mod_rewrite.so
AddModule mod_rewrite.c


The rewrite rules would be:

RewriteEngine  on
RewriteRule    ^/xyz/index\.html$    http://www.domain.com/cgi-bin/program.cgi [L]

And it may go into VirtualHost container.


Take a peek at Apache docs.
http://httpd.apache.org/docs/mod/mod_rewrite.html


good luck
0
 
LVL 15

Expert Comment

by:samri
Comment Utility
Try this one out.  You need to have mod_rewrite loaded/enabled

Look in httpd.conf, and make sure these two lines are not commented.  If it is, uncomment, and restart apache.

LoadModule rewrite_module     libexec/mod_rewrite.so
AddModule mod_rewrite.c


The rewrite rules would be:

RewriteEngine  on
RewriteRule    ^/xyz/index\.html$    http://www.domain.com/cgi-bin/program.cgi [L]

And it may go into VirtualHost container.


Take a peek at Apache docs.
http://httpd.apache.org/docs/mod/mod_rewrite.html


good luck
0
 
LVL 15

Accepted Solution

by:
samri earned 100 total points
Comment Utility
apology on the repeated posts.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now