Skip to content

Instantly share code, notes, and snippets.

@dahngeek
Created June 23, 2023 16:53
Show Gist options
  • Save dahngeek/9e4961bbdfffb931cdfbd4ab8bb524f6 to your computer and use it in GitHub Desktop.
Save dahngeek/9e4961bbdfffb931cdfbd4ab8bb524f6 to your computer and use it in GitHub Desktop.
Server configuration for laravel in a shared hosting , working with IONOS hosting.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteBase /
Options +FollowSymLinks
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment