Jump to content

Force https


dbmv

Recommended Posts

  • 1 month later...

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) http-s-://%{HTTP_HOST}%{REQUEST_URI}

 

I tried adding that to my .htaccess but when I go to the URL all I get is

 

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

Link to comment
Share on other sites

This isn't necessary any more for the client side as whmcs will do it automatically (fFor the necessary pages) if you enter an SSL url in the config.

 

Whmcs will redirect https back to http for the client side on the pages which don't require https, which is why you see that error.

 

However you can put that file in the admin folder to force https only in the admin area :)

Link to comment
Share on other sites

Ace,

 

I am using the way you showed and it works just fine in Firefox 1.5 and 2 for me. Are you sure that is not a typo where it says "http-s-://" ? Here is what my .htaccess file looks like in the root of my non-secure folder:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

 

It redirects anything that goes to the non-secure folder to my secure one (which actually contains whmcs) which forces the entire whmcs to be secure.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated