Tuesday 12 January 2016

How to remove public and index.php from URL in laravel

1.) First copy all files of public folder and paste in root directry.

2.) open the index file

set path on line no. 21 require __DIR__.'/bootstrap/autoload.php';
and line no. 35   $app = require_once __DIR__.'/bootstrap/app.php';
 
3.) Open .htaccess file and paste following code.

Options -MultiViews
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

No comments:

Post a Comment