MyBB Community Forums

Full Version: help me i cannot force https on my forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
im using cloudflare service on my site
using https connection
but the site use both http and https
and that making some errors on page
how to force https and replace http with https
please help me
i tried htaccess file and its failed
On cloudflare follow this: CP > Crypto > SSL > Full (strict)
looks like its not helping Error 526
i tried htaccess
its gave me error when i used this
RewriteEngine On

### WWW & HTTPS

# ensure www.
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# ensure https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
The page isn’t redirecting properly
and i got also this after using that
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
500 Error, please check your php script / enable display_errors in your cpanel
what is missing to force that on https
Remove the rule from your htaccess file and just use the cloudflare full(strict) setting and it should automatically enable it.
Do not forget to change your website & cookies link from your board settings.
(2016-10-21, 02:49 AM)[PMC] John Wrote: [ -> ]Remove the rule from your htaccess file and just use the cloudflare full(strict) setting and it should automatically enable it.
i said that option gave me Error 526
(2016-10-21, 07:44 PM)Neeeeeeeeeel.- Wrote: [ -> ]Do not forget to change your website & cookies link from your board settings.
in the settings i changed the main domain from http to https but when the user type http it go the http never redirect to the https
You must have both Apache/CF redirection + https settings on the forum in order to get it working properly.

I will share my htacccess configuration for https restriction
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yoursite.com/$1 [R=301,L]
https://support.cloudflare.com/hc/en-us/...ertificate <-- Thats the error documentation and you probably ended up configuration it wrong. Read through that and see if it helps.
hmmm
just Enable the full Strict giving me the error 526
there something i suspect
The requested domain name (hostname) is in the Common Name or Subject Alternative Name configuration of the certificate.
the other 2 i have no idea what they means or what are these points is talking about
by the way while the option full strict is on the website run only VIA http and error 526 came when you try https

i find the way to solve that
in option i find
Page Rules
Control your Cloudflare settings by URL
the problem is solved
Glad you found a solution, I completely forgot that's what actually forced it on my website.