1 Replies - 3066 Views - Last Post: 17 February 2013 - 07:13 PM

#1 Chemlight  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 6
  • Joined: 28-September 07

.htaccess file that stops php files from accessing parent directory

Posted 17 February 2013 - 07:00 PM

I'm not sure if this is the correct place to post this question, my apologies if it is in the wrong place.

In short, I have the following directory:

/parentDirectory/childDirectoryOne
/parentDirectory/childDirectoryTwo

What I need is an .htaccess file that I can place in the parent directory that won't let any php files in childDirectoryOne access either parentDirectory or childDirectoryTwo, to either scan the directory, execute files, or even read the contents of the files. It should restrict scripts to execute/read/write ONLY in the childDirectoryOne and children directories.

Is This A Good Question/Topic? 0
  • +

Replies To: .htaccess file that stops php files from accessing parent directory

#2 Chemlight  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 6
  • Joined: 28-September 07

Re: .htaccess file that stops php files from accessing parent directory

Posted 17 February 2013 - 07:13 PM

As an added bit of information. It is okay if there needs to be a .htaccess file in the child directory to override the settings from the .htaccess file in the parent directory. I've just been having a tough time finding information, because it seems that all of the tutorials on .htaccess files are for mod_rewrites.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1