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>
This entry was posted in Uncategorized. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">