Apache Force SSL https on directory

edit your .htaccess file:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} DirectoryName
RewriteRule ^(.*)$ https://YourDomain.com/DirectoryName/$1 [R,L]

this will force https on the directory “DirectoryName”

replace DirectoryName with your directory and YourDomain.com with your domain.

2 thoughts on “Apache Force SSL https on directory”

Leave a Reply

Your email address will not be published. Required fields are marked *