For the record, Rewrite rules do not like to be written as slashes in CGI-BIN URLs.
Perhaps this was known to others before, but was new to me. In your .htaccess file
Bad
RewriteRule ^(.*)$ /cgi-bin/books/$1 [QSA,L]
Good
RewriteRule ^(.*)$ /cgi-bin/books?$1 [QSA,L]
Notice the ? instead of the / in the good one.
For some reason, I was under the impression that using the slash, I could get the information in the URL using a PATH_INFO
e.g.
PERL:
my $string_to_mangle = $cgi->path_info;
The above would grab /page/main
from http://yourhost.com/cgi-bin/some.cgi/page/main
However, I now need to change this to
PERL:
my @bits = $cgi->keywords;
my $string_to_mangle =
join " ",
@bits;
and this shows that I use the keywords method on the Perl CGI object.
This then would grab page/main
from http://yourhost.com/cgi-bin/some.cgi?page/main
You may want to combine this to be able to deal with either path_info or keywords. E.g.
PERL:
my $details = "";
and (length($cgi->
path_info) ) {
$details = $cgi->path_info;
}
and (length($cgi->
keywords) ) {
my @bits = $cgi->keywords;
$details =
join " ",
@bits;
}
else {
$details = "";
}
Anyway .. a frustration now has an answer. I should probably have RTFM'ed !