Ada tiga metode yang bisa digunakan untuk hal ini.
1. Merubah nama file server.php pada direktori laravel Anda menjadi index.php
2. Meng-copy kan file .httaccess yang ada pada direktori /public ke direktori root laravel Anda. (cara ini sebenarnya tidak dianjurkan, karena file .env Anda bisa di akses public sehingga user dan password DB anda bisa terlihat)
3. Merubah / edit file .httaccess Anda seperti contoh dibawah ini :
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/public/ RewriteRule ^(css|js|images)/(.*)$ public/$1/$2 [L,NC]