mrreza
mrreza

Reputation: 71

diffrent path for load bootstrap in yii2 on server & localhost

diffrent path for load bootstrap in yii2

in local:

localhost/akharin2/web/assets/e7c1d11a/css/bootstrap.css

in server:

example.com/web/assets/6a4bdd46/css/bootstrap.css

Loaded from 2 different locations Why does this problem arise? How to fix

Upvotes: 0

Views: 322

Answers (1)

ScaisEdge
ScaisEdge

Reputation: 133380

The web/assets/xxxxx are automatically managed by yii2 framework.

First time an application component asset as a .css or a .js is required on a host istance and this is not already available to the framework, Yii build dinamically a new subselect where store a copy of the required asset element using a dinamic name. This is complety autmatically managed by the frameqork and you don't need to worry for the phisical location of the these asset copies.

you can take a look a this guide if you want know more about assets management by yii2 http://www.yiiframework.com/doc-2.0/guide-structure-assets.html

Upvotes: 1

Related Questions