How force a directory into https://

  • Secure-yourself

The following is easy:

Add the following lines to  .htaccess file inside a directory you will need to secure:

RewriteEngine on
#Options +FollowSymlinks
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$1 [R,L]

where is the directory you need to secure.
All http requests within this directory will be forced to go to https.

I found a very useful tool to check unsecure contents in https page:


About the Author: