Forced HTTPS on Joomla Admin and now locked out!

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
johnyc241
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu May 24, 2018 3:31 am

Forced HTTPS on Joomla Admin and now locked out!

Postby johnyc241 » Thu May 24, 2018 3:37 am

Hi everyone, as I was looking to purchase an SSL certificate for my Joomla site, I mistakenly went to the Joomla Admin, Global Configuration section, and selected "Forced HTTPS" for the entire site, so I now do not have access to Joomla admin or the website.

How can I fix this to get access to the Joomla admin again? I purchased an SSL certificate with namecheap.com and tried to configure the SSL files on cPanel for my site, but that is not working, so I am hoping to get access to the Joomla admin somehow and changing the global configuration setting to not Force HTTPs.

Thank you!

KianWilliam
Joomla! Intern
Joomla! Intern
Posts: 67
Joined: Thu Jan 12, 2017 10:13 am

Re: Forced HTTPS on Joomla Admin and now locked out!

Postby KianWilliam » Thu May 24, 2018 5:54 am

You may go to your configuration.php file and change the value of $force_ssl from 1 to 0
Kian William

alexkevin
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue May 15, 2018 7:20 am

Re: Forced HTTPS on Joomla Admin and now locked out!

Postby alexkevin » Thu May 24, 2018 7:54 am

You can use your .htaccess file for this without having to change code.

Force HTTPS for certain pages:
CODE: SELECT ALL

########## Begin - Force HTTPS for certain pages
# Force the page foobar.html to run in HTTPS mode, no matter what Joomla! says.
RewriteCond %{HTTPS} ^off$ [NC]
RewriteRule ^foobar\.html$ https://www.domain.com/foobar.html [L,R=301]
########## End - Force HTTPS for certain pages

foobar is example ....replace by real links...same for domain.com which should be your real domain name...in other words you need to change this line and copy for those pages needed:
CODE: SELECT ALL

RewriteRule ^foobar\.html$ https://www.domain.com/foobar.html [L,R=301]
In case you wish to force HTTPS for a particular folder you can use:
CODE: SELECT ALL

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} somefolder
RewriteRule ^(.*)$ https://www.domain.com/somefolder/$1 [R,L]

Rewrite to SSL or NON-SSL using relative URL:
CODE: SELECT ALL

RewriteRule ^/(.*):SSL$ https://%{SERVER_NAME}/$1 [R,L]
RewriteRule ^/(.*):NOSSL$ http://%{SERVER_NAME}/$1 [R,L]
Hope this helps

johnyc241
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu May 24, 2018 3:31 am

Re: Forced HTTPS on Joomla Admin and now locked out!

Postby johnyc241 » Thu May 24, 2018 2:13 pm

KianWilliam wrote:You may go to your configuration.php file and change the value of $force_ssl from 1 to 0
Kian William


Hi Kian, thank you for your post. the "$force_ssl" was a 2 and I changed it to 0 through cPanel, and it is still redirecting to the HTTPS. I changed the number, deleted the "$force_ssl", and a few other things involving that specific line of code.

Do you have any other possible suggestions?

Thank you again!

- John

johnyc241
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu May 24, 2018 3:31 am

Re: Forced HTTPS on Joomla Admin and now locked out!

Postby johnyc241 » Thu May 24, 2018 2:29 pm

alexkevin wrote:You can use your .htaccess file for this without having to change code.

Force HTTPS for certain pages:
CODE: SELECT ALL

########## Begin - Force HTTPS for certain pages
# Force the page foobar.html to run in HTTPS mode, no matter what Joomla! says.
RewriteCond %{HTTPS} ^off$ [NC]
RewriteRule ^foobar\.html$ https://www.domain.com/foobar.html [L,R=301]
########## End - Force HTTPS for certain pages

foobar is example ....replace by real links...same for domain.com which should be your real domain name...in other words you need to change this line and copy for those pages needed:
CODE: SELECT ALL

RewriteRule ^foobar\.html$ https://www.domain.com/foobar.html [L,R=301]
In case you wish to force HTTPS for a particular folder you can use:
CODE: SELECT ALL

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} somefolder
RewriteRule ^(.*)$ https://www.domain.com/somefolder/$1 [R,L]

Rewrite to SSL or NON-SSL using relative URL:
CODE: SELECT ALL

RewriteRule ^/(.*):SSL$ https://%{SERVER_NAME}/$1 [R,L]
RewriteRule ^/(.*):NOSSL$ http://%{SERVER_NAME}/$1 [R,L]
Hope this helps


Hi alexkevin, thank you for your post. I am having some trouble with the code. I tried using Rewrite to NOSSL, but that did not work, unfortunately. I am wondering if it may be easier to obtain an SSL certificate instead.

- John

KianWilliam
Joomla! Intern
Joomla! Intern
Posts: 67
Joined: Thu Jan 12, 2017 10:13 am

Re: Forced HTTPS on Joomla Admin and now locked out!

Postby KianWilliam » Fri May 25, 2018 3:49 pm

In that case use .htaccess to fix it, just .htaccess is so syntax driven and needs patience
wish you success
Kian William

johnyc241
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu May 24, 2018 3:31 am

Re: Forced HTTPS on Joomla Admin and now locked out!

Postby johnyc241 » Mon May 28, 2018 7:56 pm

KianWilliam wrote:In that case use .htaccess to fix it, just .htaccess is so syntax driven and needs patience
wish you success
Kian William



Hey Kian, I was able to get it to work. I thank you for your help!


Return to “Administration Joomla! 3.x”

Who is online

Users browsing this forum: Webdongle and 6 guests