Mike Otharan
Mike Otharan

Reputation: 953

How to put https correctly on links that are in another location?

I am facing the following problem in my hosting with https

enter image description here

How should I put https in my tags?

 <!-- Bootstrap Core Css -->
<link href="<?= base_url() ?>public/plugins/bootstrap/css/bootstrap.css" rel="stylesheet">
<!-- Waves Effect Css -->
<link href="<?= base_url() ?>public/plugins/node-waves/waves.css" rel="stylesheet" />
<!-- Animation Css -->
<link href="<?= base_url() ?>public/plugins/animate-css/animate.css" rel="stylesheet" />
<!-- Materialize Css -->
<link href="<?= base_url() ?>public/css/materialize.css" rel="stylesheet">
<!-- Custom Css -->
<link href="<?= base_url() ?>public/css/style.css" rel="stylesheet">

Upvotes: 0

Views: 21

Answers (1)

Kiruse
Kiruse

Reputation: 88

This answer over here might be of value to you: base_url() function not working in codeigniter.

The important part in question:

Remember also that the value returned is the site's base url as provided in the config file. CodeIgniter will accomodate an empty value in the config file as well:

If this (base_url) is not set then CodeIgniter will guess the protocol, domain and path to your installation.

application/config/config.php, line 13

In other words, you probably just want to set the configuration variable to the correct value (using 'https'). You can probably even tell it to use $_SERVER['SERVER_PROTOCOL'] to toggle between http and https appropriately.

Upvotes: 1

Related Questions