What .htaccess rules should be used - undesired redirect to htdocs/index.html


I am trying to move one Yii web application to other server, but I encounter strange behavior - if application is put into root folder (e.g. protected is the direct subfolder of htdocs of Apache), the application works as expected, but if it is moved to its own subfolder of htdocs (e.g. the directory structure is /htdocs/myapp/protected - as it should be, in any case), then each request to the application is redirected to the htdocs/index.html with appears to be with the content ‘It works!’. I guess, that is connected with htaccess rules, but what rules should be put in htdocs and in htdocs/myapp/?


Try adding this:

RewriteBase /myapp/