Skip to content

Instantly share code, notes, and snippets.

@Xatta-Trone
Created October 1, 2019 17:16
Show Gist options
  • Select an option

  • Save Xatta-Trone/1f0845cc1eb8fd5fb48b4333384acf0e to your computer and use it in GitHub Desktop.

Select an option

Save Xatta-Trone/1f0845cc1eb8fd5fb48b4333384acf0e to your computer and use it in GitHub Desktop.
Paste this code into your root directory of your laravel project inside the .htaccess file
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]
RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
RewriteRule ^(.*)$ public/$1
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ server.php
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment