😅Remove Public from URL (ok)
https://stackoverflow.com/questions/28364496/laravel-5-remove-public-from-url
Rename
server.php
in your Laravel root folder toindex.php
Copy the
.htaccess
file from/public
directory to your Laravel root folder.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
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]
RewriteCond %{REQUEST_URI} !(.css|.js|.png|.jpg|.gif|robots.txt|.ttf)$ [NC]
</IfModule>
Previous[ERROR] @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100) sass (ok)Next[ERROR] Curl error (code 3) (ok)
Last updated
Was this helpful?