I have an issue with creating my rewrite for this cgi script query string. I'm using mod_alias/scriptalias to point incoming users to run a script. If a user browses to: "http://www.example.com/example1/cgi-bin/script.cgi?b_action=xts.run&m=portal/main.xts&startwel=yes" it runs a script an produces an ugly URL: http://www.example.com. Basically, I want to strip out the entire URI and query string so users only see a pretty URL: http://www.example.com/reporting. Below is some of my configuration.
#File called example1.conf - contains mod_alias directives
ScriptAlias /example1/cgi-bin /opt/path/to/dir/cgi-bin/
Alias /example1 /opt/path/to/dir/cgi-bin/
<Directory "/opt/path/to/dir/cgi-bin/">
Options Indexes MultiViews
AllowOverride All
</Directory>
#http.conf - section that has the mod_rewrite which I know is awful #and wrong so I'm trying to fix it
RewriteEngine On
RewriteCond $1 !ex2.html
RewriteCond $1 !ex3.xml
RewriteCond $1 !ibmcognos
# Comment out line below and replace HOSTNAME with DNS host entry
RewriteRule ^(.*)$ http://www.example.com [R,L]
Any help will be greatly appreciated. Thank you