httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject [users@httpd] Validity of regex in mod_alias context
Date Tue, 21 Feb 2006 08:58:29 GMT
Hello Apache httpd users,

I have just subscribed to this list to clarify a few things for
me that so far 
I couldn't find in the abundance of Apache and its modules'
refeernce and howto 
Probably something like this has been asked a million of times
here and thus already
found sufficient coverage in the FAQs or similar list annals.

Although I am quite sure that what I try to achieve can easily be
handled by
mod_rewrite I hesitate pulling in this module's heavy regex
parser as it sort of
seems like overkill to me for such a trivial task.

Inspite, I have the supicion that the more light weight mod_alias
could equally well come
to rescue.

I have a URI (i.e. Alias) whose <Directory> container should
include an SSLRequireSSL
to enforce SSL/TLS for clients' access.

However, instead of the browser merely returning a forbidden
statement I'd rather
like to redirect any http request into a https request to the
same URI.

That's why I thought up this

        <IfModule mod_alias.c>
            RedirectMatch 301 ^(?:[[:alpha:]]+://)?(.*)

But it doesn't work, and neither the httpd's access_log nor
error_log (or their ssl_ namesakes)
show up any hint why.

In mod_alias'es reference doc I couldn't find a note on what kind
of regex classes are valid
(e.g. simple ones like the Unix sed uses, or more advanced like
Perl's e.g. \w).
Probably the [:alpha:] isn't recognised at all.

Or could I refer to some server's environment variables like
%{PROTO} (if such exists at all?)
Where would I find a list of all httpd env vars?


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message