I hosted my yii app in GoDaddy linux server(shared hosting). Any form submissions or redirection happens it suffix the webroot folder name to the baseurl. For example, I keep all the application folder in webroot/. "www.mydomain.com/index.php/site/index" is the url and after any redirect it becomes www.mydomain.com/mydomain/index.php/site/index. It gives 404 not found error.
Here mydomain is the folder name of webroot. I came through similar issues in many forums, i didn’t get any clear solution to this. I think it is a simple thing to do.
Please help me and thanks in advance.
my htaccess file
RewriteEngine on
if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
otherwise forward it to index.php
RewriteRule . index.php
my redirection code:
$this->redirect(array("Site/index"));