I have a very simple MVC framework that works like the following:
http://www.domain.com/controller/class/args
This framework uses the following .htaccess:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?route=$1 [L,QSA]
So I could do something like:
www.domain.com/page/class/vars
Now I can rewrite this simple domain to:
page.domain.com what actually is domain.com/page but I endup with a problem here.
Now I want to use subdomain.domain.com and I want to use a controller and than the class this is not possible.
I was thinking of making a small DB that holds the subdomains and when I query them and get a positive, I set the $controller to $page. But this will be page for every subdomain because this is the only way to handle it well.
Also I have the problem that I can't run controllers for the subdomains anymore and need to do everything from classes in the "page" file, which is not the idea behind the MVC.
Now, what is a good idea to use:
subdomain.domain.com/page/class/arg which such a framework ?
The idea of framework that I use is only available from archive.org, so I will post a link here.
http://web.archive.org/web/2008012823352/http://www.phpit.net/article/simple-mvc-php5
I have made some tryouts with checking the DB and manipulating the router, but I would like to get some ideas on it too.
I hope someone can help out.