I'm successfully rewriting specific http->https URLs using some code
suggested by Ralf Engleschall (see below).  Now I'm trying to modify
RewriteCond to avoid the need to have multiple entries in my map file for
entries like these:

my.cgi
my.cgi/response

I want to pass either REQUEST_FILENAME or SCRIPT_FILENAME to the map instead
of the URI, but both pass the URI as the key, in spite of their names.

I looked at mod_rewrite.c  and I can see that this happens because of the
following code:

/* if filename was not initially set,
 * we start with the requested URI
 */
if (r->filename == NULL)

    r->filename = ap_pstrdup(r->pool, r->uri);
    rewritelog(r, 2, "init rewrite engine with requested uri %s",
               r->filename);
}

That's the extent of my insight.   Why haven't I set filename and how might
I do this?
--
Carrie Coy
(Apache/1.3.12 (Unix) FrontPage/4.0.4.3 PHP/3.0.12 mod_perl/1.21
mod_ssl/2.6.2 OpenSSL/0.9.5 )

RewriteEngine           on
RewriteLog              "/usr/local/apache/logs/rewrite.log"
RewriteLogLevel         5
RewriteMap  https-map   txt:/usr/local/apache/conf/secure.map
RewriteCond %{SERVER_PORT}      =80
RewriteCond ${https-map:%{REQUEST_FILENAME}|do-not-map}         !=do-not-map
RewriteRule ^(/.*)$  https://%{SERVER_NAME}/${https-map:$1} [R,L]
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to