S
S
Samarkand2017-05-24 19:55:56
Yii
Samarkand, 2017-05-24 19:55:56

Why does Yii automatically add the domain name to relative paths? How to ban it?

Styles are written in the protected/views/layouts/head.php template:

<link rel="stylesheet" href="/css/normalize.css" type="text/css" media="screen, projection" />

But in the source code of the page, you can see that yii replaces relative paths with absolute ones.
<link rel="stylesheet" href="http://site.com/css/normalize.css" type="text/css" media="screen, projection" />

And scripts do not touch, only styles.
How to turn it off?
Because of this, when working through https, styles are not loaded.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Samarkand, 2017-05-25
@Samarkand

Yes, it was a binding over yii. Thank you so much for responding!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question