Yii Framework Forum: Frontend and backend structure to share common files and htaccess - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Frontend and backend structure to share common files and htaccess Rate Topic: -----

#1 User is offline   chaitsi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 21-November 11

Posted 21 August 2012 - 04:02 AM

I m beginner in yii

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
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users