Hi Andre´, I removed the IfModule tags as you suggested. I also removed the RedirectMatch directive from mod_alias an instead load the bulk of mod_rewrite. In the directory container I included these directives Alias /loo/ /var/www/turd/ <Directory /var/www/turd> Options SymlinksIfOwnerMatch RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule ^(?:.+://)?(.*) https://$1 [R,L] SSLRequireSSL </Directory> But it doesn't work either when I GET http://localhost/loo/, and after having raised to debug log level I get this reference to a possibly forgotten FolowSymLinks directive (only because of this did I include SymlinksIfOwnerMatch in the container) [Tue Feb 21 17:52:48 2006] [error] [] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: Actually, I don't find the error message much helpful as I did what it said an provided the SymLinksIfOwnerMatch (I realize to have spelled Links with lower case l, but I suppose case doesn't matter? > -----Original Message----- > From: André Malo [mailto:nd@xxxxxxxxx] > Sent: Tuesday, February 21, 2006 11:55 AM > To: users@xxxxxxxxxxxxxxxx > Subject: Re: [users@httpd] Validity of regex in mod_alias context > > > * <Ralph.Grothe@xxxxxxxxxxxxxx> 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: users-unsubscribe@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > > --------------------------------------------------------------------- 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