How to have module as web root

Hi,

i am setting up a yii website which fundamentally has two applications:

  1. a website (which has some authentication)

  2. a web application (which provides a service)

As i need to share modules and components i’ve created a single yii application and have organized the folder structure as follows:

my website

– core (this is the protected folder)

– www (contains index.php which points to a config file within core\config specific to www)

– app (contains index.php which points to a config file within core\config specific to app)

essentially, the www and app folders simply contains the index.php and the image/asset folders and the core folder is where all the interesting stuff is.

I have created two modules wwwroot and approot, each having controllers and models specific to the www and app respectively.

I have also configured both web apps in apache in different subdomains like so:

www is www.mydomain.com

app is app.mydomain.com

what i would like to do, and i need your help for, is to make the modules respond to root requests.

so that a request to www.mydomain.com?r=site/index is handled by www.mydomain.com/?r=wwwroot/site/index

i would also eventually want seo friendly urls, so if you can help me with that too would really appreciate.

thanks in advance

Hi,

read this or whole chapter and you’ll get a clue how to do what you need.

Cheers