Login | Sign up | Toll-Free: 1-800-752-0455



7 posts by 3 authors in: Forums > CMS Builder
Last Post: October 18

Hi yea,
Were I to have ssl on a site and then the ssl runs out and I was happy to use non ssl how can I access cms to configer this. Would I get totally locked out and have no access to the cp etc as soon as the ssl ran out.




If you have "Require HTTPS" enabled in CMS Builder and you can't connect via HTTPS to login and change the setting, you can change that setting directly in the setting.dat.php file.

Change the setting to this to turn off  "Require HTTPS":

'requireHTTPS' => '0',

Damon Edis

Hire me! Save time by getting our experts to help with your project.

thank you Damon,
I have tried, 

 'requireHTTPS' => 0,

 'requireHTTPS' => '0',

 'requireHTTPS' => '1',

and  'requireHTTPS' => '',

On each occasion I have cleared my cache but wow, I still not able to access. 



ok wowa I think I can see where I was going wrong, I was using permalinks and the permalinks code in the htaccess was doing what it was supposed to do I think,

### Set URL_SCHEME (REQUEST_SCHEME isn't available before Apache < 2.4 and can include hostname)

RewriteCond %{HTTPS} off
RewriteRule .* - [E=URL_SCHEME:http]
RewriteCond %{HTTPS} on
RewriteRule .* - [E=URL_SCHEME:https]

all in all when I remove the permalinks code in the htaccess, but I need to have the perma links code, thus I have tried to change it aka the above is what is there now, but I have tried this below but that didnt work either.,....

RewriteCond %{HTTPS} off
RewriteRule .* - [E=URL_SCHEME:http]
RewriteCond %{HTTPS} on
RewriteRule .* - [E=URL_SCHEME:https]

and tried

RewriteCond %{HTTPS} off

RewriteRule .* - [E=URL_SCHEME:http]
RewriteCond %{HTTPS} off
RewriteRule .* - [E=URL_SCHEME:https]

all in all lol I cannot get it to work, would be grateful for any input.



Hi Kenny, 

If your issue is that the .htaccess code is force redirecting all requests to https then you can try the following.  In .htaccess:

Make sure this block is using the original code as follows.  All this code does is set a variable URL_SCHEME that we can test to see if https is enabled or not.

### Manually detect URL Scheme (http or https). Cloud Servers & Load Balancers don't always give correct value
### ... of: HTTPS, REQUEST_SCHEME, SERVER_PORT, but ENV:HTTPS is sometimes manually set for us so we check both.
RewriteCond %{HTTPS} on [NC,OR]
RewriteCond %{ENV:HTTPS} on [NC]
RewriteRule .* - [E=URL_SCHEME:https,S=1]
RewriteRule .* - [E=URL_SCHEME:http]

Next, comment out this block of code by adding # symbols in front of the lines: 

### Force HTTPS secure connections - Optional security (uncomment to use)
#RewriteCond %{ENV:URL_SCHEME} http$ [NC]
#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NE,L]

Let me know if that works for you!

PS: You can also check with your host about getting free SSL certificates through letsEncrypt.com.  Many hosts and control panels now have simple one-click features to enable it, and then you never have to pay for SSL certificates again.

Dave Edis - Senior Developer

Thank you Dave,
I gave letsEncrypt.com a good go yesterday, but hostgator reseller hosting is not the easiest to get it running so I will have a go again some other time. As for the issue with https I see where I had gone wrong

in the htaccess I have 

### Pass URL to permalinks dispatcher (do this last after any www or https redirects)

RewriteRule ^permalinks_dispatcher\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cmsmycmsfoldername/plugins/permalinks/permalinks_dispatcher.php [L]
# END: CMS Permalink Code

I initially set up a working test site to begin wtih on a different url and now wanted to copy that test site over to the domain where I was actually going to use it.

the permalink code was actually calling the cms dir from the original test site area all in all I renamed it correctly and everything seem to fall into place.