I have frontend,backend and API's in my yii2 project.I have remove front/web from url.I follow following post for that. http://www.yiiframework.com/wiki/755/how-to-hide-frontend-web-in-url-addresses-on-apache/ But my entire images getting not found error in backend and frontend.I am facing problem to give path.I have tried following code In params-local.php
Yii ::setAlias('@source', 'http://example.com');
In Frontend/index.php
<body style="background-image:url(.<?Yii ::getAlias('@source') ?>.'/images/media-bg.jpg');background-attachment:fixed;">
Still getting Error (#2) .Please help
You have some syntax error in this line:
Replace with:
Set Alias(common/config/bootstrap.php):
Get Alias:
Getting Uploaded image from project root directory