Skip to content

Instantly share code, notes, and snippets.

@aymanalareqi
Last active December 22, 2023 16:05
Show Gist options
  • Save aymanalareqi/d3989656e25547a6cca997f9ac627797 to your computer and use it in GitHub Desktop.
Save aymanalareqi/d3989656e25547a6cca997f9ac627797 to your computer and use it in GitHub Desktop.
code to deploy laravel on shared hosting
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/example/public/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /example/public/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ example/public/
Header always set Content-Security-Policy: upgrade-insecure-requests
RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment