Setting up the directory structures to my peoject

Hi All,

  1. I have set up a http://test.example.com subdomain to xtest folder in my web root. Inside that folder I have two folders. my_application and the yii (framework files)

  2. My problem is I should enter http://test.example.com/my_application to visit my application(test web site). But I need it to be just "http://test.example.com/".

(I tried putting all my_application files in the "xtest" folder itself. but it did not work - FYI: it is also containing the yii files. Basically xtest folder is the root folder for my test site )

  1. How can I do this? Is there a setting in Yii for this? Which section I should look into for this kind of problems?

Thanks,

YiiStarter.

hello basically you have to move everything from my_application to xtest (don’t forget to adjust the path to the framework in the index.php)

it is important that your index.php lies in xtest

for further reading (after you solved this) urlmanager might be in your interest

Hi,

Thanks a lot for the reply I will try this and let you know the results.

Thanks

Hi balrok,

This worked. Thanks again for helping me out.

Thanks

Hi,

I have solved my directory structure problem. But I have another thing to ask.

I want to implement my CMS in the best way. (perhaps a better way recommended by yii). My problem is about the controllers. (I’m currently using the default folder structure which is generated for me by yii)

  1. My Idea was to have two separate controllers for the "CMS" and the "front end"

  2. This will not be good because "CMS" will add up sections therefore more "actions" making it a very big file. (Eg:- My CMS will have sections called pages, users, portfolio, products, ect, ect…)

  • What should I do to keep the controller smaller(simpler)?

  • If I need to use several controllers for admin how can I separate them from the normal controllers for the front end? (can admin have a separate directory for it’s own files while it also shares code with the front end when necessary)

  • How can I share any code between these two?

  • Is there any recommended way to implement these kind of projects in yii?

Thanks in advance.