* <[EMAIL PROTECTED]> wrote:
> <IfModule mod_alias.c>
> RedirectMatch 301 ^(?:[[:alpha:]]+://)?(.*)
> https://$1
> </IfModule>
>
>
> 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.
httpd 2.x utilizes PCRE, so it's quite like perl (which doesn't know the
POSIX classes). More interesting for your case: RedirectMatch works (like
mod_rewrite) with the URL path only, so you need to use some other logic.
You could either use mod_rewrite to check if SSL is available, or, if
you want to avoid it, put the RedirectMatch into the HTTP VirtualHost only.
Side note: Try to avoid <IfModule> containers. They just hide useful errors
if the module is not loaded.
> Or could I refer to some server's environment variables like
> %{PROTO} (if such exists at all?)
No.
nd
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]