Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Location of HOST variable to convert http to https

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
snowBeard
Smarty n00b


Joined: 09 Feb 2021
Posts: 2

PostPosted: Tue Feb 09, 2021 11:17 am    Post subject: Location of HOST variable to convert http to https Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Feb 10, 2021 4:20 am    Post subject: Reply with quote

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
View user's profile Send private message
snowBeard
Smarty n00b


Joined: 09 Feb 2021
Posts: 2

PostPosted: Wed Feb 10, 2021 3:11 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP