Make index.cgi redirect to Apache webserver document root

Posted by Casey on Stack Overflow See other posts from Stack Overflow or by Casey
Published on 2012-08-29T03:28:35Z Indexed on 2012/08/29 3:38 UTC
Read the original article Hit count: 203

Filed under:
|
|

I'm trying to expose a CGI file as my document root and web server. I do not want to expose the fact that the server is running a CGI script.

How can I map a URL http://host/index.cgi/ back to http://host/ in Apache2? I'm guessing it involves mod-rewrite, but I haven't finished grokking all the docs yet.

The following configuration is working, but I'm guessing there is a more complete solution:

RewriteEngine ON
Redirect /index.cgi/    /

© Stack Overflow or respective owner

Related posts about apache

Related posts about mod-rewrite