Created
April 24, 2020 07:45
-
-
Save wp-kitten/627257365e135d2cf83012331b138bd6 to your computer and use it in GitHub Desktop.
Localhost Laravel app htaccess
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
# | |
# Local .htaccess file | |
# Used to set the "public" directory as the document root | |
### laravel App (https://laravel-site.dev/) | |
# | |
Options +FollowSymLinks -MultiViews | |
# Turn mod_rewrite on | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{DOCUMENT_ROOT}/public/$1 -f [OR] | |
RewriteCond %{DOCUMENT_ROOT}/public/$1 -d [OR] | |
RewriteCond %{DOCUMENT_ROOT}/public/$1 -l | |
# Once you verify it is working fine, replace R=302 to R=301. Avoid using R=301 (Permanent Redirect) while testing your mod_rewrite rules. | |
RewriteRule (?!^public/)^(.*)$ /public/$1 [R=302,L,NC] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment