.htaccess help

I need for requests to: mywebsite.com

to actually hit:


I don’t want it to be transparent to the browser. The user should still see mywebsite.com even though they are hitting mywebsite.com/project

I have tried the following in my .htaccess file with no luck:

RewriteRule %{HTTP_HOST} ^website\.com$ website.com/project$1 

RewriteRule ^website\.com(.*)$ website.com/project$1 

RewriteRule ^website\.com$ website\.com/project$1 

Can anyone help????

Please show us the directory structure of your project.

For example …



    /html ... DocumentRoot




        /protected ... yii application

      /framework ... yii framework


It’s very hard for us to understand your problem without these information. :)

I think this should do the trick:

RewriteBase /

RewriteCond %{REQUEST_URI} !^/project

RewriteRule ^(.*)$ project/$1 [L]

Why not use URL rewrite rules?

 'urlManager' => array(

            'urlFormat' => 'path',

            'showScriptName' => false,

            'rules' => array(

                '/' => '/project/index',



OR you could change default method/controller