I'm using the IDE PhpStorm 7.1.4 and trying to make an .htaccess file to stop users from going into a specific directory.
My folder structure is like this:
I want to make it so that users can't go in the /app
folder or any folders inside that folder. For this, I've figured out that I can use this piece of code inside .htaccess
:
Options -Indexes
I'm using the PHP web server from PHPStorm itself (which goes to localhost:63342/projectname/folderinproject/etc/etc/
).
Problems
When directing to the page to the
/app
folder, I get an 404 error, saying the index file doesn't exist.When I have made an
index.php
file inside the/app
folder, and I am redirecting to the/app
folder, it just loading up theindex.php
.When doing this with just a normal HTML project and opening the
index.html
via my windows explorer, the same problem occurs
Question
How can I make it so that my project would actually respond on the .htaccess
file and wont allow me or other users to go into the /app
folder?
EDIT
I figured out that when I copy all my files from my project to the c:\xampp\htdocs\
folder and turn on my Apache server inside of XAMPP, the .htaccess
file is working whenever I open it via my regular browser (without selecting index.php
in PhpStorm and choosing Open in browser...
).
Is there any way I can do this same thing in PhpStorm without moving all the files?