Re: Protecing files
| From: | Jasper Bryant-Greene | Date: | Tue, 30 Aug 2005 05:46:55 +0000 |
| Subject: | Re: Protecing files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221564@lists.php.net to get a copy of this message | ||
Thomas wrote:
Thanks for all the answers. I had not considered leaving the xml file outside the webroot (duh!). However, in this case I don't think it would work, as the project is working through a svn structure (and some boxes run Linux, otherwise Win). I thought that the .htaccess would have been the best (apparently not?). Anyway, I will give the filtering out of the .whatever a shot. One thing on that: how about portability? What if I didn't have access to the httpd.conf file of Apache on the live server? How will I enable such rules (without having to bother the server dude, who may or may not like to do that)? From that question, .htaccess files seemm the most portable solution.Please don't top-post. For one application I develop, I have the whole thing in an SVN tree like so: [root] | |--- includes/ | |--- htdocs/ Anything that doesn't need to be requested directly goes in includes/ and its subdirectories, and everything else goes in htdocs/ and accesses stuff in includes/ when it needs to. Apache is configured to serve from htdocs/, obviously. There's no reason why this can't be done with any SVN setup, even in most shared hosting environments, although YMMV. Jasper