I have laravel setup on xampp located in http://localhost/laravel
but to test it I have to go to localhost/laravel/public
How do I get rid of the /public ?
I would like to be able to access it directly through http://localhost/laravel
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The better way is to use a virtual host and you may check this answer to setup a virtual host. Also you may use this solution but it's not recommended because it tells to move all files and folders from public
to your app root folder.
回答2:
- REMOVING .htaccess from root if you have created
- take all files and folder from public to root directory
- remove ../ from index.php
- rename OR remove public folder
回答3:
Try this article. It explains why .htaccess is not the way to go, and offers two alternatives. http://driesvints.com/blog/laravel-4-on-a-shared-host