I use Laravel framework. As you know, its directory looks like this:
To open the homepage of my website (Route::get('/', 'HomeController@index');
) I need to open /public
folder of directory. In other word, to see the first page of my website, here is the URL:
http://example.com/public
anyway, only my domainname (http://example.com/
) isn't my root. How can I make /public
folder as root?
Curently I've found a workaround. I can create an index.php
on the root and write a redirect code to /public
folder. So when user enters http://example.com/
, it will be redirected to http://example.com/public
automatically. But still that's ugly. I don't like to see /public
in the URL. Any suggestion?