I implemented a simple version of friendly urls using the example in the guide, but seem to loose all my css and images. Looking closer, the image address is displayed as
It seems to be reading the path as in example one vs example two. I'm a little confused to why it's doing this.
My configuration file looks like:
I call the url by using something like
$this->render('services', array('content'=>$result['narrative'], 'pic'=>$pic));
What am I dong wrong please?
What do your css/image tag look like?
Here is what the image tag looks like:
<?php echo CHtml::link(CHtml::image('css/new_logo_left2.jpg',Yii::app()->homeUrl),Yii::app()->homeUrl); ?>
You should prefix it with Yii::app()->baseUrl. Otherwise, it may have the problem as you described under certain Apache configuration.
Changed the code as follows, but still the same problem.
<?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl.'css/new_logo_left2.jpg',Yii::app()->homeUrl),Yii::app()->homeUrl); ?>
You need a slash after baseUrl.
That fixed it. Thanks Qiang.