Skip to content

Instantly share code, notes, and snippets.

@egin10
Last active January 25, 2020 09:55
Show Gist options
  • Save egin10/3c2cabfd96eea8ed064c8c9ba9cd5c15 to your computer and use it in GitHub Desktop.
Save egin10/3c2cabfd96eea8ed064c8c9ba9cd5c15 to your computer and use it in GitHub Desktop.
Deployment Laravel 5.8 to Shared Hosting
# put this htaccess on root directory
<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>
copy server.php on root directory and use index.php as name of the file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment