Created
January 6, 2022 18:24
-
-
Save ozkanozcan/ac80bdff4fea862a396c03293990e4b1 to your computer and use it in GitHub Desktop.
Setup An .Htaccess File For Redirecting To Laravel’s Public Folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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