Laravel 4 removing public from URL

后端 未结 20 2109
一个人的身影
一个人的身影 2020-11-29 04:33

So, I\'m running xampp on Windows. I\'m currently trying to get familiar with the laravel framework. Now, when thats pointed out. How can i be able to access my laravel appl

20条回答
  •  自闭症患者
    2020-11-29 04:53

    Add following code in your .htaccess (if not exist create a .htaccess on laravel root directory)

    
        RewriteEngine On
        RewriteRule ^(.*)$ public/$1 [L]
    
    

    Source : http://tutsnare.com/remove-public-from-url-laravel/

    at Source you also get another method to do same.

    Update : Preferred way to do it is make change in directory structure which explain in source URL.

提交回复
热议问题