Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save francosalcedo/26c32f683acaaad24804b4e773443fae to your computer and use it in GitHub Desktop.
Save francosalcedo/26c32f683acaaad24804b4e773443fae to your computer and use it in GitHub Desktop.
Laravel in shared hosting apache htaccess
In root directory (public_html/.htaccess)
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
In public/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment