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?