Eu diria que você deve colocar seu novo arquivo .htaccess na pasta public_html.
Experimente o seguinte com o mod_rewrite no seu arquivo .htaccess
RewriteEngine On
# This will enable the Rewrite capabilities
RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
# This rule will redirect users from their original location, to the same location but using HTTPS.
# i.e. http://www.example.com/foo/ to https://www.example.com/foo/
# The leading slash is made optional so that this will work either in httpd.conf or .htaccess context
Essas três linhas também precisam ser adicionadas ao arquivo .htaccess na pasta blog
, modificando o RewriteRule
para refletir essa subpasta:
RewriteRule ^/?(.*) https://%{SERVER_NAME}/blog/$1 [R,L]
Também pode ser útil aplicar o mod_ssl para forçar o SSL com a diretiva SSLRequireSSL :
This directive forbids access unless HTTP over SSL (i.e. HTTPS) is enabled for the current connection. This is very handy inside the SSL-enabled virtual host or directories for defending against configuration errors that expose stuff that should be protected. When this directive is present all requests are denied which are not using SSL. Keep in mind that this will not do a redirect to https by itself.