Skip to content

Instantly share code, notes, and snippets.

@shahaj90
Last active March 9, 2024 17:17
Show Gist options
  • Save shahaj90/aadf08fc892390fd252dde6922491b60 to your computer and use it in GitHub Desktop.
Save shahaj90/aadf08fc892390fd252dde6922491b60 to your computer and use it in GitHub Desktop.
Laravel htaccess file for cPanel
<IfModule mod_rewrite.c>
# That was ONLY to protect you from 500 errors
# if your server did not have mod_rewrite enabled
RewriteEngine On
# RewriteBase /
# NOT needed unless you're using mod_alias to redirect
RewriteCond %{REQUEST_URI} !/public
RewriteRule ^(.*)$ public/$1 [L]
# Direct all requests to /public folder
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment