Laravel multisite solutions

I want to make a multisite webpage solution like Tubmlr. Basically all I want to do, is that once my user publish his/her page, it will have an URL like {username}.domain.com. I came up with two solutions so far.

.htaccess: malac.domain.com will go to malac.domain.com/user/usrname

sub-domain-routing:

Route::group(array('domain' => '{username}.domain.com'), function()
{
    Route::get('/', 'UserController@published_page');
});

My question would be, which one should I use and why? Will I run into any problem in the future?

I do want to store all the static files at one place.

Answers


I haven't read it all yet, but this seems like a good tutorial. From my own opinion I would use sub-domain-routing. Just because htaccess is not portable to nginx server. But otherwise both would work


Need Your Help

Why is there an OS segment reserved in virtual memory

operating-system segmentation-fault virtual-memory

Why is there a portion of virtual memory reserved for OS? Why is it limited to a certain size? This seems to be a universally known fact because when I googled I didn't find anyone asking similar

How to Bypass Local Login Screen with Oauth2 and GAE

google-app-engine python-2.7 oauth-2.0 google-oauth python-decorators

I am working with the Oauth2 Decorator provided by Google. Right now I am just trying to do a very simple login via Oauth2 to Google using GAE. I am running locally for test purposes and have been