|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
snowBeard Smarty n00b
Joined: 09 Feb 2021 Posts: 2
|
Posted: Tue Feb 09, 2021 11:17 am Post subject: Location of HOST variable to convert http to https |
|
|
I have some code that contains what appears to be a global variable: $HOST
This is used throughout the template structure to request the URL path of all css, images, js files etc.
So it looks like:
Code: | <link href="{$HOST}css/custom.css" rel="stylesheet"> |
Problem is that it writes the URL in to the page as:
Code: | <link href="http://www.mydomain.com/css/custom.css" rel="stylesheet"> |
But now this needs to change to use SSL, so it needs to return:
Code: | <link href="https://www.mydomain.com/css/custom.css" rel="stylesheet"> |
But I can't find / change the HOST variable, and do not know the location! It's not in the config file or any place that I can find.
Any help or ideas would be much appreciated, thanks in advance! |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Feb 10, 2021 4:20 am Post subject: |
|
|
This is a user variable. Find it in your PHP code.
Code: | LESS=-SR#4 ag --php --color --pager=less 'HOST\b' |
|
|
Back to top |
|
snowBeard Smarty n00b
Joined: 09 Feb 2021 Posts: 2
|
Posted: Wed Feb 10, 2021 3:11 pm Post subject: |
|
|
Brilliant thank you so much!
I'd previously searched through all site files using grep but as it returned so many I'd missed the one that mattered.
Thanks again |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|