.htaccess - http to https force redirect excluding addon websites -


my primary domain stands on cpanel account. let's call "myprimary". in domain i've installed ssl. default ssl accessible if force url redirect http request https url.

for reason used following code (inside .htaccess) works pretty good.

rewriteengine on rewritecond %{https} !=on rewritecond %{http_host} ^myprimary.com$ [or] rewritecond %{http_host} ^www.myprimary.com$ rewriterule .* https://www.myprimary.com%{request_uri} [r=301,l] header set content-security-policy: upgrade-insecure-requests 

also i've added addon domain appears (you know) folder in public_html (which root primary one). addon website has no ssl installed there.

using code above forces browser ask https in addon causing fail , not load @ all. there way have redirect https primary , exclude website inside (i guess directory).

thank in advance.


Comments

Popular posts from this blog

java - inputmismatch exception -

c - zlib and gdi32 with OpenSSL? -

Formatting string according to pattern without regex in php -