I have redirect all incoming traffic to the http://example.foo.bar to run a cgi script. The doc root is /var/www/html and the script resides in /opt/foo/bar/example1/cgi-bin/ directory. Please help me troubleshoot this. Currently it's set up my http.conf is set up for this as such:
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#.htaccess located in the doc root
RewriteEngine on
RewriteCond %{HTTP_HOST} !^example\.foo\.bar$[NC]
RewriteRule ^example1.html$ example2.cgi