I have created one structure to handle files for frontend and backend so that common files can be used for both and different files form their folder
---------------------------------------------------------------------------------
framework/ (This folder will contain all yii framework core folders and files)
assets/
js/
frontend/
common/
backend/
api
images/
storage/
protected/
components/
config
main.php (DB, emails, etc...)
controllers/
frontend/
backend/
views/
frontend/
backend/
models/
extensions/
modules/
runtime/
index.php
.htaccess
---------------------------------------------------------------------------------
this structure is created for booking application.
Some common files are shared between them it will be there in controller/ and views/
and differnrt file will be in controller/frontend/ and controller/backend/
Example
I have files in both folder as below
controller/
SiteController.php
Frontend/SiteController.php
Backend/SiteController.php
views/
layouts/
Frontend/layouts
Backend/layouts
Now the question is how can i set .htaccess so that
when i write http://myapp.com/index.php --> will access all files for frontend
and
http://myapp.com/backend/inex.php --> will access backend files (beckend views and controller)
thanks in advance

Help












