php - Redirect ALL http requests to https using F3 Fat-Free Framework -


i guess title says all. want anytime browser makes request starting http:// change https://

i using f3 framework, have routes set up. i'm not sure if should add route this? if so, line like?

or should modify .htaccess file in f3 document root? have been trying route , not working. browser requests http:// remaining way. have been modifying .htaccess in f3 folder according following:

how redirect http requests https

and, it's not working @ all.

you need use .htaccess in public_html or "root" publicly accessible in order modify http redirect https.

something this:

rewriteengine on rewritecond %{server_port} !=443 rewritecond %{http_host} ^(www\.)?example\.com*$ [nc] rewriterule ^$ https://example.com%{request_uri} [r,l] 

Comments