Yii Initializr Issue


I’m a beginner at using the Yii Framework and just got to learn how to work with the paths. Not long ago I stumbled upon yii initialzr which installs the HTML5 boilerplate on my yii website along with yiistrap. I’ve decided to give it a try and managed to succesfully install it. Now my issue is, I’ve been trying to navigate to another page but all I get to see is a white page as if the CSS file does not get loaded. This is how it looks.

The path to the CSS is wrong as well.

I have a feeling it has to do with the htaccess, but whenever I try to edit the htaccess in app folder it seems like it’s not being read at all. Help would be greatly appreciated because I’ve been camping with this for a while now.

I assume when you go to http://localhost/testenv1/www/ it goes normal right?

The problem is i think you should not use relative path to css folder. For example if you go to http://localhost/testenv1/www/site/login then the app will search for http://localhost/testenv1/www/site/css/bootstrap.min.css which isn’t there.

Maybe this will work depending on where you placed css files

<link rel="stylesheet" href="<?php echo Yii::app()->baseUrl ?>/css/bootstrap.min.css" />

Ah thanks, it works now I can continue my journey now :)