![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jun 2004
Posts: 162
|
Protecting XML config files
How can I protect xml config files from viewing by the user, yet allow my script to read it?
if in .htaccess I deny .xml, then the script can't read it... Any solution to this? |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Mar 2006
Location: New York
Posts: 1,950
|
Put it outside your web directory, access it via path.
__________________
![]() 2257 Third-Party Custodian of Records Services Designed by an attorney to be DOJ compliant Only $1 per record |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Mar 2009
Location: NP-hard
Posts: 287
|
...if you put it in .htaccess, the script will be able to read it. htaccess controls files served by apache to the OUTSIDE world - if your script is on the same machine with the right permissions you will be able to read it.
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Aug 2007
Location: Montreal
Posts: 1,005
|
How are you reading the XML file? .htaccess shouldn't block you from reading it unless you use a URL to open it. Use the local path instead.
|
![]() |
![]() ![]() ![]() ![]() |