Dear Fathi,
I have varnish on the same machine and I am using a rule like this:
if (req.http.host ~ "(subdomain1|subdomain2).example.com$") {
return (synth(301, "https://"+req.http.host+req.url));
}
So any URL like
subdomain1.example.com/folder/subfolder/index.php?myparameter=123
is redirected to its counterpart with https.
If you want to apply the rule to anything, just skip the if-clause.
Greetings,
Hermann
Am 05.10.20 um 20:26 schrieb Fathi Ben Nasr:
> Hi,
>
> I would like to implemet a generic Redirect 301
> https://$host$request_uri, so instead of listing every service in the
> HTTP Listener and then redirecting it to its HTTPS port, I only list
> Services on the ListenHTTPS section while in the ListenHTTP section I
> would have a single service that redirects to
> https://$host$request_uri where $host and $request_uri are read from
> the http header.
>
> Is this achievable ? And how ?
>
> TIA.
>
> Fathi Ben Nasr
>
>
--
pound mailing list
[email protected]
https://admin.hostpoint.ch/mailman/listinfo/pound_apsis.ch