Yii2 basic problem in deploying in freehost

Hi, I have problem in deploying the basic yii2 template in my freehost.

my problem is that this path


is appending to the url


how can I make it to remove the extra path,I want only my url looks like this


Thank you in advance.

This is the logic for how the base url is worked out:

$baseUrl = $this->showScriptName || !$this->enablePrettyUrl ? $this->getScriptUrl() : $this->getBaseUrl();

If you check your config for these values you can work out what is happening but anyway…

…you can set baseUrl as a property of urlManager in your config which should override anything that is incorrect: http://www.yiiframework.com/doc-2.0/yii-web-urlmanager.html#$baseUrl-detail