Laravel 4 removing public from URL

后端 未结 20 2107
一个人的身影
一个人的身影 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:35

    just in simple step i did in laravel 5 make .htaccess like this in laravel folder

    
        
            Options -MultiViews
        
    
        RewriteEngine On
        # Redirect Trailing Slashes...
        RewriteRule ^(.*)/$ /$1 [L,R=301]
    
        # Handle Front Controller...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ ./index.php [L]
    
    

    then rename your server.php to index.php

    that it it will work

    or if you just doing local development

    run this comman php artisan serve

    it will start local server at localhost:8000 (port may vary)

提交回复
热议问题