HTTPS Redirect with exclude

Example how to redirect to HTTPS, but excluding .well-know/* directory.

<VirtualHost *:80>
   ServerAlias domain.net
   RedirectMatch 301 ^/((?!\.well-known).*)$ https://domain.net/$1
</VirtualHost>

Leave a Reply