Skip to content

Instantly share code, notes, and snippets.

@ratulkuri
Created October 3, 2019 06:29
Show Gist options
  • Select an option

  • Save ratulkuri/4da8f6ae926246a794ea560ece7f3f62 to your computer and use it in GitHub Desktop.

Select an option

Save ratulkuri/4da8f6ae926246a794ea560ece7f3f62 to your computer and use it in GitHub Desktop.
Laravel Root Directory Issue for Shared Hosting Fix
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

Laravel Root Directory Issue for Shared Hosting Fix

Change laravel root directory from "public_html/public" to "public_html" using ".htaccess" file.

Usage

Add this code into your .htaccess file

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment