Skip to content

Instantly share code, notes, and snippets.

@faulker
Last active August 10, 2016 06:32
Show Gist options
  • Save faulker/4d35415f9bc779f5a9214183f8088cab to your computer and use it in GitHub Desktop.
Save faulker/4d35415f9bc779f5a9214183f8088cab to your computer and use it in GitHub Desktop.
Getting Laravel to work on Shared hosting
* create .htaccess file and put the fallowing in it
RewriteBase /
RewriteCond %{HTTP_HOST} !^subdomain
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
RewriteCond %{HTTP_HOST} ^subdomain
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/ [L]
* run the fallowing commands
find /path/to/your/root/directory -type f -exec chmod 644 {} \;
find /path/to/your/root/directory -type d -exec chmod 755 {} \;
chmod -R ug+rwx storage bootstrap/cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment