02-24-2018, 03:18 PM
What you're essentially thinking is how MVC (model, view controller works). We don't use that. I've thought about making an MVC version of userspice, but I think a lot of people like that it's NOT mvc.
There are ways to do this with an .htaccess file, but you would have to do a lot of tweaking.
The other option for when you get to a live server is to take two subdomains and point them to the same physical folder on your server and then store the company name you want to redirect them to would be in your users table for each user. Basically add a column called company or whatever to the users table.
Then, if your site was google.com you would do your links like
https://<?=$user->data()->company?>....s/test.php
Not the same as what you were asking, but a ton less fiddling. I do have an mvc controller for UserSpice but it's not ready, so that could work in the mean time.
There are ways to do this with an .htaccess file, but you would have to do a lot of tweaking.
The other option for when you get to a live server is to take two subdomains and point them to the same physical folder on your server and then store the company name you want to redirect them to would be in your users table for each user. Basically add a column called company or whatever to the users table.
Then, if your site was google.com you would do your links like
https://<?=$user->data()->company?>....s/test.php
Not the same as what you were asking, but a ton less fiddling. I do have an mvc controller for UserSpice but it's not ready, so that could work in the mean time.