Skip to content

Instantly share code, notes, and snippets.

@chetans9
Created July 17, 2018 05:59
Show Gist options
  • Save chetans9/42806568bda3c8f2067f9cae152c32d1 to your computer and use it in GitHub Desktop.
Save chetans9/42806568bda3c8f2067f9cae152c32d1 to your computer and use it in GitHub Desktop.
laravel htacces to remove public
<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>
@chetans9
Copy link
Author

chetans9 commented Jul 17, 2018

Best way : make public folder as apache/vhost root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment