[...] > > Do not change anything with "picts" in it. > > You might try prefacing the entire thing with > > RewriteRule picts - [L] > > > For the rule above: > > Change to /index.cgi for: > > / > > anything that both begins and ends in "/", i.e. "/.*/" > > That might be: > > RewriteRule ^/$ /index.cgi [PT,QSA] > RewriteRule ^/.+/$ /index.cgi [PT,QSA] > Thanks for these suggestions; I'll try them. I note that on my system, QUERY_STRING appears if there are arguments, without the QSA specification. Why do you use "PT" rather than "L"? > > The other rule, not shown here, was incorrect. The > corrected version is: > > RewriteRule ^/.*\.html(\?.*$)? /index.cgi$1 [L] > > > > This will call /index.cgi for any URL that begins in "/", > ends in ".html", > > and optionally has argumenmts following a ?. If there are > arguments, > > they will be passed to index.cgi. > > There's one problem with this approach. The arguments > following a ? are > not part of what you are allowed to consider in a > RewriteRule. That is, > RewriteRule considers the REQUEST_URI, not including the > http:// or the > hostname or the QUERY_STRING (the QUERY_STRING is the bit > starting with > the ?). If you want to retain the QUERY_STRING, you need to > use the QSA > flag (QUERY STRING APPEND) to do that. Granted, there's a > chance that it > appeared to be working anyway, because of the trailing ? making the > whole thing optional. I have read that the arguments should not be used, and no doubt it is best to follow this directive. I note, however, that, as verified by debug logging, the arguments following ? do appear in argv of index.cgi (C++), suggesting that RewriteRule does see the arguments. Aside from that, I wonder if there is any reason not to use argv[0] to determine the current directory? (I note that in some cases other than those discussed here, , cgi is called from directories other than / .) [...] > > - -- > Rich Bowen > Mike. -- Michael D. Berger m.d.berger@xxxxxxxx --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx