I am creating a website which runs on https.. But when i create absolute url using
echo Yii::app()->createAbsoluteUrl('site/index');
it always return http://mydomainname.com/site/index.
my expected output is https://mydomainname.com/site/index.
How can i create a url with https ?
Try this
Yii::app()->createAbsoluteUrl('site/index', array(), 'https');