Laravel 8 404 not found after redirecting to public folder with .htaccess

Viewed 28

I created .htaccess file in the root directory with the following code to redirect to public folder:

RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]

When I try to visit the root directory like localhost/myproject/, I get 404 not found view.

I want to run the website from public folder directly. How to fix the issue?

0 Answers
Related