Re: [users@httpd] Validity of regex in mod_alias context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ralph.Grothe@xxxxxxxxxxxxxx wrote:
RewriteRule     ^(?:.+://)?(.*) https://$1 [R,L]

This doesn't look correct. The pattern is matched against a local URL in per-server context - w/o sheme+hostname - and a local filepath in per-dir context

RewriteRule ^(.*) https://example.com/loo/$1 [R,L]

There is also an other issue: You're using an alias, remember the rule matches in per-dir context only against a local filepath, so you must specify the alias in the substitution, if you prefix it with sheme+hostname.

[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?

No, case shouldn't matter, but is there any other <Directory ....> container or .htaccess file which might override the setting from this one? this error message is very usefully, but it looks like something is overriding your Options setting (and disabling symlinks again).

All in all personally I would place the rule in per-server context (main server config section, <virtualhost ...>)
but then with

RewriteEngine   on
RewriteCond     %{HTTPS} !=on
RewriteRule     ^(/loo/.*) https://example.com$1 [R,L]

--
Robert

---------------------------------------------------------------------
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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux