Yii Framework Forum: Single codebase to multi sub-sites - Yii Framework Forum

Jump to content

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

Single codebase to multi sub-sites any idea how to create some sub-sites under the same codebase Rate Topic: -----

#1 User is offline   msimaremare 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 13-November 11

Posted 17 July 2012 - 10:32 PM

dear all,

i am in a site development which has some sub-site, to simplify assume there is an organization with some sub-organizations. i read somewhere that if we are going to make some sub-sites it would be better to put them under the same domain with sub-directories, than to put them under a different sub-domain.

how to do that in Yii ? if we are going to use the same code base for those primary and sub-sites, any idea ?
thank you for every suggestion,.
0

#2 User is offline   yiqing95 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 608
  • Joined: 27-December 10
  • Location:china

Posted 17 July 2012 - 11:21 PM

modules will be ok . on module map to a subsite :lol:

another voice is welcome !
0

#3 User is offline   rookie84 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 115
  • Joined: 16-November 11

Posted 18 July 2012 - 12:07 AM

As yiqing95 mentioned, modules will do, another idea is to make this happen on DB level. For example having a tbl_site table and other tables reference it.

Or load config/main.php depending on the domain.

I have used the above two methods in one of my multisite projects.
0

#4 User is offline   msimaremare 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 13-November 11

Posted 24 July 2012 - 04:28 AM

thank you for suggestions, appreciate it a lot, and will learn about it,.
:)
0

#5 User is offline   Alessandro Correia 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 18-April 12

Posted 13 September 2017 - 09:46 PM

https://github.com/y...ng-more-apps.md
follow this explanation to implement its.
0

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