Search code examples
phpmysqlangularjs.htaccess

how to disable server directory listing?


The problem is that I have an index.html and using angularjs I call in query/ directory .php files for example connection.php (that connect to the database mysql), users.php (number of users registered to my website) the problem is that if someone try to write www.mywebsite.com/query/ can see the list of the queries present into my database, is there any method to block them? I tried to edit .htaccess file changing the path but writing the changed path there is the same problem.


Solution

  • Try this in your htaccess file

    Options -Indexes