I am facing issue "Index of /" while accessing my website that i have uploaded on cPanel direct root. Even I have .htaccess file in public_html
I try this htaccess code.
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /public/$1
#RewriteRule ^ index.php [L]
RewriteRule ^(/)?$ public/index.php [L]
</IfModule>
2
Answers
You need to disable indexing your paths from htaccess. Add this line to htaccess above: