Jump to content

What changes home, downloads, etc to https from http?


annomander

Recommended Posts

I have just installed a SSL, and I have a slight problem with my custom template pages.

 

If I go to a page that whmcs directs to https, eg: Login and then go to one of my custom template pages, the page stays for that one visit at https, but because the base url is set to http, I get image errors invalidating the ssl.

 

If I click somewhere else, then it gos back to http.

 

But I've noticed on index, downloads, etc that this two click rule isn't present, how can I get my custom pages to act the same as certain whmcs pages?

 

cheers

Edited by annomander
Link to comment
Share on other sites

All of the pages that you click back seem to be custom pages. WHMCS only handles to standard whmcs pages so it thinks it is still https.

to fix open header.tpl and change this

{if $systemurl}<base href="{$systemurl}" />{/if}

to this

{php}global $CONFIG;$this->assign('url', (($_SERVER['HTTPS'] == 'on') ? $CONFIG['SystemSSLURL'] : $CONFIG['SystemURL']));{/php}
<base href="{$url}/" />

Link to comment
Share on other sites

to make the other pages go to http, I presume I would need to add a lot htaccess redirects

No, If you do that you will end up with an endless loop as whmcs will keep changing it back to https. Certain pages in whmcs should be https like the cart, login, and the clientarea pages.

Link to comment
Share on other sites

What happens at the moment, if we take for example 3 pages and a senario.

home (index)

hosting plans (custom template)

login (secure ssl)

 

 

If we are on home (http) and then go to hosting this stays as http, if we go to login then it changes to https as it should.

 

 

Now that we are on login, if we go back to plans then it stays as https for that visit.

 

but if we go to the home page straight off, then it switches to http straight away.

 

 

Now a curious action is if we have two custom pages and are at login with https in the url, if we click on custom1, it stays https, but if we then click on custom2 it switches to http on the second click?

 

Its not a big deal now that its not displaying errors. Cheers

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