user1082754
user1082754

Reputation:

PHP - MVC within MVC

I'm learning about MVC frameworks, and I am about to start building a website that will eventually store all of my work. I plan to build a simple blog system using a MVC framework. But then I also want to host my other work within that MVC. For instance, if I have just created a simple todo list app that is also built with an MVC framework, I want to be host that on my portfolio too.

For instance, myportfolio.com will be the main app. myportfolio.com/otherapp will be a piece of work that I would like to host on my portfolio.

Can anybody provide any suggestions as to how this might be achieved, without having to port all models, views and controllers to a single main app?

Upvotes: 0

Views: 263

Answers (1)

deceze
deceze

Reputation: 522005

Just make an exception on how the URL is handled. myportfolio.com/, myportfolio.com/foo, myportfolio.com/bar etc. are all handled by your MVC blogging system, only myportfolio.com/otherapp is handled by your otherapp. This can simply be achieved through RewriteRules in an .htaccess file, but how exactly depends on how exactly your framework works.

Upvotes: 4

Related Questions