Force subfolder site to use https
Hi,
I am having a heck of a time getting my subfolder (not sub domain) site working off of my main domain certificate.
For example i have www.example.com/newsite
https works fine on www.example.com/newsite
i get "the page isnt redirecting properly" on firefox and on chrome it just fails.
so in the main dir i put this in the htaccess file
and i tried this line too (added the subdir name)
but it is still not working... any ideas?
# special code to force sub folders to use main domains certificate
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(subdirectory/.*)$ https://www.mysite.com/$1 [R=301,L]
and i tried this line too (added the subdir name)
RewriteRule ^(subdirectory/.*)$ https://www.mydomain.com/subdirectory/$1 [R=301,L]
but it is still not working... any ideas?
-
I sure am glad i only have to do this stuff 1x a year because by the time i am done im ready to pack it all in. Anyway so far i have tried about 10 different htaccess rules to try to do this, both in the main domain and in the sub folder htaccess files. Nothing works... Now just fyi, i did install the certificate at domain user cp level and not in whm if that makes a difference. help lol ? update: i just remembered im using cloudflare free program, maybe that is the issue as i have not set the ssl over there yet. 0 -
OMG OMG OMG That was it... i just set cloudflare to full strict setting and bam it works... reminder to everyone if your banging your head against the wall, try to remember if you use cloudflare to check those settings. I very seldom have to mess with it so i get forgetfull... 0 -
Hello, I'm glad to see you were able to solve the issue. Thank you for sharing the outcome. 0
Please sign in to leave a comment.
Comments
3 comments