0
Hello, so my question is the following, I have a folder called admin and another call general, which is inside the admin. Inside the admin folder I have a file called general.php so far ok, the problem is that if I access it like this:
http://localhost/forum/admin/general/
it enters the general folder and displays everything it has in it, and I don’t want to display anything much less a list of directories would have to avoid this? i tried with htaccess and did not succeed, now if I access so it opens the general file.php
http://localhost/forum/admin/general.php
I tried to use htacess as I had said so:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^geral(.*)$ geral.php
RewriteRule ^teste(.*)$ teste.php
And it keeps going into the general folder instead of going into the general.php file.
It’s a little impractical to keep creating an index.html in each folder, don’t think it would be easier to use htaccess?
– Leo Letto
You’re right I’m researching and I’ll edit my answer.
– Bartolomeu S. Gusella