Am 09.09.17 um 16:03 schrieb Markus Rietzler:
> hi,
>
> i want activate redirection from http to https for my sites. but my problem
> is, that there are certain requests, which
> can't be redirected to https.
>
> so i have to write some acls to check this.
>
> the urls which can't be redirected all contains client=xxxx, they can look
> like:
>
> - /path/what=all;client=bar
> - /path/what=all;client=foo
> - /path/what=all;client=bar;mode=something
> - /path/?client=bar;what=today
>
> those paths will be internal rewritten in apache.
>
> so i need to check, that client= is not present in the request.
>
> there are two further cases: client=; and client=sitemap they can be
> redirected to https. i tried a few ways but they
> didn't work. i either get a 503 Server not available or all the client=xxx
> requests are redirected to https.
>
> i tried:
>
> acl clientCheck urlp_reg /client=(?!(sitemap|;)).+/
> redirect scheme https code 301 if !clientCheck
>
> or
>
> acl clientCheck path_reg /client=/
> redirect scheme https code 301 if !clientCheck
>
> any hints?
>
> thanxs
>
> markus
>
>
have tried to setup another rule. just redirect on certain paths.
acl redirect_host hdr(host) -i www.host.de
acl pathContent path_beg /agb /aktuell /datenschutz /fotos ...
acl is_root path -i /
redirect scheme https code 301 if redirect_host pathContent
redirect scheme https code 301 if redirect_host is_root
but then i get a
503 Service Unavailable
No server is available to handle this request.
error. this is the log for this case:
12.34.56.78:52328 [09/Sep/2017:16:24:53.888] www www/<NOSRV> 1/-1/-1/-1/1 503
349 - - LR-- 64/53/0/0/0 0/0
{www.host.de|Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWe}
"GET /fotos/1234.jpg HTTP/1.1"\