I'm using the following to redirect http to https in my root directory htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
But this seems not to work if I access directly sub directories (http://example.com/sub-directory/) unless I place this mod_rewrite in an htaccess file in all my sub drectories.
Anyone knows a better way to do this? Just in my root htaccess file?