Apologies if this has been asked already. I tried to do an extensive search but I don’t know much about htaccess so I don’t know which questions have been relevant.
Right now I’m setting up a pretty expansive system with php that requires several pages and functions. To keep things simple and manageable, I have one single file “economy.php” that then requires files from the “/economy/” directory.
I read on another question that the best way to deal with the files within only being accessed from the economy.php file is to use an htaccess file in /economy with deny from all. This worked, except now the images and stylesheet within the /economy directory don’t work.
The solution I can think of is to create a directory /economy/pages/ and throw the php files and htaccess file in there. But that’s sloppy, and I’m assuming there’s an easier way to handle it.
What’s my best course of action?
I think you should look at the Files apache directive
So you should have something like that :
Hope this helps …
Mimiz