Closed Rudloff closed 8 years ago
From what I can remember siteUrl generates relative links so it shouldn't make a difference if your server is configured correctly.
I'm pretty sure it generates absolute URLs.
For example, {siteUrl url='dist/main.css'}
gives me http://localhost/alltube/dist/main.css
.
ok just add withUri="false"
to the smarty tag and you should get relative urls.
https://github.com/slimphp/Slim-Views/blob/master/SmartyPlugins/function.siteUrl.php#L15
I tried {siteUrl url='dist/main.css' withUri=false}
but it gives me this URL: http://localhost/dist/main.css
At this point I am going to suggest not using siteUrl or creating your own without using Slim Request getUrl method. I think the getUrl method is doing absolute urls.
It seems my server is not correctly setting $_SERVER['HTTPS']
to true, so Slim getUrl method could not properly detect SSL...
I am using
siteUrl
in Smarty templates on an HTTPS website and it generates HTTP URLs. It should generate HTTPS URLs.