htaccess redirect to public folder laravel code example
Example 1: htaccess redirect to public folder
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ public/index.php?$1 [L,QSA]
Example 2: laravel project htaccess redirect to public path
//In your Root directory create a file .htaccess and write it
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]