Skip to content

Instantly share code, notes, and snippets.

@antonybudianto
Last active October 16, 2021 16:58
Show Gist options
  • Save antonybudianto/d11c7da5b72e0e2e7dbb to your computer and use it in GitHub Desktop.
Save antonybudianto/d11c7da5b72e0e2e7dbb to your computer and use it in GitHub Desktop.
remove /public when deploy Laravel on shared hosting
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [L]
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment