.htaccess ReWrite引擎隐藏目录

I have a laravel application which I'm getting errors on. My public folder is in the root folder and the .htaccess file is in the public folder.

My .htaccess is below

<IfModule mod_rewrite.c>
    RewriteEngine On
    # Redirect Trailing Slashes...
    #RewriteRule ^(.*)/$ /$1 [L,R=301]
    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

Navigating to the root folder does NOT show me the public folder in the listing. When I remove the contents of the .htaccess, I am able to see the folder. Any idea what I'm getting wrong?

Probably the problem is in your server's configuration - there is an option to hide directories with their own .htaccess files from listings.