Need help configuring yii installation

In the configuring web servers of the installation documentation page, it gives instructions as if I want to to run my yii app at the root directory of my website. What if I want to run my yii app as a subdirectory, or have multiple yii apps on the same website? What do I do then?

So I want to upload the basic yii app to a subfolder on my website, and that subfolder redirect to the web/ folder when accessed in a browser.

How do I do that?

Multiple index.php in separate dirs.

using .htaccess to redirect from the subfolder basic/ to basic/web.

but that is not secure, because your web seems so:


http://yourdomain.com/frontend/web/index.php