December 2007
Beginner to intermediate
310 pages
8h 8m
English
You want to redirect requests for documents to a CGI script, or other handler, that gets the document names as an argument.
Use RewriteRule in httpd.conf:
RewriteRule "^/dir/([^./]*)\.html" "/dir/script.cgi?doc=$1" [PT]
This solution causes all requests for HTML documents in the
specified location to be turned into requests for a handler script
that receives the document name as an argument in the QUERY_STRING environment variable.
The PT flag should be included to allow any
appropriate subsequent URL rewriting or manipulation to be
performed.
Read now
Unlock full access