Solved

configure apache to intercept all requests with a cgi program

Posted on 2002-04-10
3
192 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
ID: 6933475
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
ID: 6933476
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
ID: 6933477
apology on the repeated posts.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 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