Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
Asset class doesn't return https:// URL
mantinia
October 2017
I use Asset class in SSL using server
but any Asset methods doesn't return https:// URL ver 1.8
without site top.
They returns https:// URL on the site top page only.
I have used 1.7 for other site a few years ago, that works correctly on any page.
Why?
Harro
October 2017
Accepted Answer
Can you give an example of what you get, and what you want to get? Your post isn't entirely clear to me.
Also, what is your asset configuration?
mantinia
October 2017
Sorry, I wrote like this at
http://foo.com/
.
<?=Asset::css('bar.css')?>
and it returns
<link href="
http://foo.com/css/bar.css
">
it's OK.
But, it returns same URL
under SSL (
https://foo.com/
) too.
It returns
http://foo.com/css/bar.css
not
https://foo.com/css/bar.css
.
mantinia
October 2017
I solved.
I set 'base_url' => '
https://foo.com/'
in config/config.php.
But I don't know why they doesn't work correctly
without this setting.
Thank you.
Harro
October 2017
If you don't set a base_url, the base_url will be determined at runtime, from the request URL. There is no way of knowing or detecting that you want something else.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
October 2017
mantinia
October 2017