tomdchi Posted May 13, 2009 Share Posted May 13, 2009 I have a problem with custom pages not displaying properly and I have tracked it down to a missing / in the header causing the style sheet link to be broken. I have the url's set properly in the admin and I only have this problem with a custom page. I tried a bunch of things and finaly went in and removed {if $systemurl}<base href="{$systemurl}" />{/if} from header.tpl and changed the stylesheet link to: <link rel="stylesheet" type="text/css" href="{$systemurl}/templates/{$template}/style.css" /> This seems to have worked and now everything displays properly but I am wondering what I may have broken by removing {if $systemurl}<base href="{$systemurl}" />{/if} Any ideas or is that a bug? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted May 13, 2009 Share Posted May 13, 2009 (edited) I have been waiting for someone to find this as well. The base href is set to http by default on any non whmcs pages (custom pages) and when you access a custom page via https results in the base href being set to http incorrectly. Here is my fix for it Replace {if $systemurl}<base href="{$systemurl}" />{/if}with {php}global $CONFIG;$this->assign('url', (($_SERVER['HTTPS'] == 'on') ? $CONFIG['SystemSSLURL'] : $CONFIG['SystemURL']));{/php} <base href="{$url}/" /> This is definatly needed for the mod rewrite links for SEO pages Edited May 13, 2009 by sparky 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.