Skip to content

Instantly share code, notes, and snippets.

@imgul
Created May 3, 2024 22:11
Show Gist options
  • Save imgul/b36d53621d62f41ad8f569006a17ccc7 to your computer and use it in GitHub Desktop.
Save imgul/b36d53621d62f41ad8f569006a17ccc7 to your computer and use it in GitHub Desktop.
HTACCESS file for the shared hosting for laravel project
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://sgpt.xsill.com/public/$1 [R,L]
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 ^ public/index.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment