Re: virtual host double slash effect, need solution

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

 



Hi David,

2017-07-15 3:11 GMT+02:00 David Mehler <dave.mehler@xxxxxxxxx>:
Hello,

I'm running Apache 2.4 on a FreeBSD 10.3 system, with several virtual
hosts. My goal is to have all of them completely ssl, except for the
.well-known area needed for letsencrypt.

<VirtualHost *:80>
    ServerName example.com
    RewriteEngine On
    RewriteRule ^/?(.*) http://www.example.com$1 [R,L]
# This line also produces the double slash effect
#     RewriteRule ^/?(.*) http://www.example.com/$1 [R,L]
</VirtualHost>


Have you tried with RewriteRule ^(.*)$ https://www.example.com$1 [R=301,L] ? (note also the https, IIUC you need to force TLS).

Hope that helps,

Luca 


[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