0

But the problem is: There a File names "includes" which includes the php files which have been included in some of the php files outside of it. But I want to lock/ make it inaccessible for users. Is it possible that the users can't access the folder/directory but the php files can? Well, Now I am testing my website on XAMPP, but I have plans to shift it to a web server. So, please answer so that I can my website more secure.

Thanks in Advance! :)

2
Contributors
3
Replies
7
Views
5 Years
Discussion Span
Last Post by cereal
0

You can use .htaccess:

order deny,allow
deny from all

put this file inside the folder to protect and no one can access from the web. Source: http://httpd.apache.org/docs/2.2/howto/access.html

bye :)

Yeah It works, but the main page and other pages which include the files inside the blocked directory/folder are unable to access them. The Files can't Access CSS, PHP Files can't access the header.php and footer.php files ( they are inside the blocked directory ) Plz Help!

0

Explain better which files you want to limit access. Because CSS files can't be stored on that kind of directory.

And post a portion of code where you include the header.php that doesn't now work. So we can see what is happening. To include a file from that directory you should write something like this:

include('/path/to/file/header.php');

where the path is the server root, not an url. Bye :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.