Answer the question
In order to leave comments, you need to log in
How to correctly migrate a project to Laravel 5 to https?
Hello. Yesterday I installed an SSL certificate on my hosting. The project on Laravel 5. The main page opens normally with the link https ://my_site But the rest of the pages open without styles, because for some reason, the styles on those pages are spelled out
<link href="HTTP://my_site/css/bootstrap.min.css" rel="stylesheet">
Answer the question
In order to leave comments, you need to log in
At the beginning of /app/Http/routes.php add:
or depending on the environment settings:
if (env('SECURE_CONNECTION', false)) URL::forceSchema('https');
Failed to insert code into comment. I'll show you a part, because he is big.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>@yield('title')</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Компания UVENTA - лучший интернет эквайринг">
<meta name="author" content="Компания UVENTA">
<link href="{{ asset('/css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ asset('/css/bootstrap-responsive.min.css') }}" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Icons -->
<link href="{{ asset('/css/general_foundicons.css') }}" media="screen" rel="stylesheet" type="text/css" />
<link href="{{ asset('/css/social_foundicons.css') }}" media="screen" rel="stylesheet" type="text/css" />
<!--[if lt IE 8]>
<link href="{{ asset('/css/general_foundicons_ie7.css') }}" media="screen" rel="stylesheet" type="text/css" />
<link href="{{ asset('/css/social_foundicons_ie7.css') }}" media="screen" rel="stylesheet" type="text/css" />
<![endif]-->
<link rel="stylesheet" href="{{ asset('/css/font-awesome.min.css') }}">
<!--[if IE 7]>
<link rel="stylesheet" href="{{ asset('/css/font-awesome-ie7.min.css') }}">
<![endif]-->
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question