Forum Moderators: phranque
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)\.html$ parser.cgi?file=$1 [QSA,L]
Now I have one of the sites being run on a VPS plan where the hosting company keeps CGI scripts in a separate folder. I had no problem with adjusting the path to the script itself in order to call it for parsing:
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)\.html$ /var/www/cgi-bin/parser.cgi?file=$1 [QSA,L]
.htaccess file is in the root of the site which is in /var/www/html/
Now it happens that parsing Perl script cannot find any of the requested files except the home page, so 404 happens every time.
My thinking tells me that parser.cgi?file=$1 points to files inside "cgi-bin" folder, but obviously they are not there. Would that be where the change is needed?
Thanks
P.S.
Aside of this concrete problem, I see that folders of this Apache package get kind of mirrored. For example, real server path like /var/www/cgi-bin/ would automatically replicate to /var/www/html/cgi-bin/
This gives me the impression I could use either path to call the script from within “cgi-bin” folder. Am I correct? Thanks