2

I just installed an SSL cert onto my web server and I'm having some issues with my laravel setup.

I'm using

{{ HTML::style('css/style.css') }}

to include css and for js

{{ HTML::script('js/jquery.js') }}

Though when I load the page with https it seems to include the 2 with http instead of https.

Any idea why?

Zander17
  • 1,894
  • 5
  • 23
  • 31

2 Answers2

6

I had an issue with this too. My SSL is redirecting fine, but the CSS and JS links generated by {{ HTML::style('css/style.css') }} and HTML::script('js/script.js') were linking to the http versions.

If you look at the Illuminate\Html\HtmlBuilder Documentation you'll see that you can specify the secure version as follows:

{{ HTML::style('css/style.css', array(), true) }}

{{ HTML::script('js/script.js', array(), true) }}

true means $secure flag is on.

ATutorMe
  • 820
  • 8
  • 14
0

This might help.

In short you need to add a App:before in the app/filters.php.

Community
  • 1
  • 1
Zac Grierson
  • 656
  • 1
  • 6
  • 21
  • After applying that I get the following: Firefox has detected that the server is redirecting the request for this address in a way that will never complete. – Zander17 Dec 15 '14 at 15:50
  • Do you have any ModRewrite rules that could be forcing JS/CSS files to use http? – mopo922 Dec 15 '14 at 15:56