[PHP] Re: htaccess question
On 04/09/2013 11:07 AM, Al wrote: I know it's not a php question, but I can't readily find the answer elsewhere. Try http://www.apache.org/foundation/mailinglists.html. -- James Moe jmm-list at sohnen-moe dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: htaccess question
Al wrote: I want to restrict access to all files except one on my site and in parent dir. Thought this should work; but it doesn't. Files * Order Deny,Allow Deny from all Allow from xx.36.2.215 /Files xx.36.2.215 is actual value IP This file makes a captcha image and is called with img src=makeScodeImg.php alt=missing img file / in file /dir/control.php makeScodeImg.php is= /dir/includes/makeScodeImg.php Works fine if allow all just for testing Thanks Seems like more of a question for an apache group than a php group. Or you might check the apache docs at: http://httpd.apache.org/docs/2.2/howto/htaccess.html http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow Cheers -- David Robley To be, or not to be, those are the parameters. Today is Sweetmorn, the 43rd day of Discord in the YOLD 3177. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: htaccess question
On 4/26/2011 5:54 AM, David Robley wrote: Al wrote: I want to restrict access to all files except one on my site and in parent dir. Thought this should work; but it doesn't. Files * Order Deny,Allow Deny from all Allow from xx.36.2.215 /Files xx.36.2.215 is actual value IP This file makes a captcha image and is called with img src=makeScodeImg.php alt=missing img file / in file /dir/control.php makeScodeImg.php is= /dir/includes/makeScodeImg.php Works fine if allow all just for testing Thanks Seems like more of a question for an apache group than a php group. Or you might check the apache docs at: http://httpd.apache.org/docs/2.2/howto/htaccess.html http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow Cheers You're correct, thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: htaccess question
On 4/24/2011 5:48 PM, Al wrote: I want to restrict access to all files except one on my site and in parent dir. Thought this should work; but it doesn't. Files * Order Deny,Allow Deny from all Allow from xx.36.2.215 /Files xx.36.2.215 is actual value IP This file makes a captcha image and is called with img src=makeScodeImg.php alt=missing img file / in file /dir/control.php makeScodeImg.php is= /dir/includes/makeScodeImg.php Works fine if allow all just for testing Thanks Whoops. I meant to say I want to restrict access to all files in a directory [/includes] except allow access to makeScodeImg.php from one in the parent dir/control.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: htaccess question
tedd wrote: Hi gang: Is there a way I can use a htaccess directive to require a php script to be included within each file contained within that directory? For example, let's say I have a directory with 100 scripts in it, but I want each script within that directory to pass through an authorization script before executing. The hard way is for me to go through each of the 100 scripts and add the statement require(auth.php), but I don't want to do that (I'm too lazy and beside there is too great of a chance of an error). So, is there a way for me to circumvent this problem by using a htaccess directive? Now, I know that I can use htaccess to require basic authorization, like so: AuthType Basic AuthName admin AuthUserFile /home/httpd/vhosts/mydomain.com/.htpass require valid-user But I don't want a file containing user ids and encrypted passwords in the file system. Instead, I want to move the user ids and passwords into the database and out of the file system. I can do this with an authorization script, but I don't want to alter 100 scripts to do it. Opinions and suggestions welcomed. Thanks, tedd .htaccess php_value auto_prepend_file /path/to/auth.php -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: htaccess question
At 10:15 AM -0500 9/11/09, Shawn McKenzie wrote: .htaccess php_value auto_prepend_file /path/to/auth.php Thanks! -Shawn AND At 5:11 PM +0200 9/11/09, J DeBord wrote: Here is a link to the manual. http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file *PHP_INI_PERDIR* Entry can be set in php.ini, .htaccess or httpd.conf Bingo! I figured there had to be something like that. Thanks guys. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: .htaccess question protect my php test environment
Frank Tudor wrote: I restart the server and then go to another computer and put in the URL and no password box comes up. Add this to the [virtual]host's section: directory /virtual_0/path/whatever AllowOverride AuthConfig Options /directory and restart httpd. -- jimoe at sohnen-moe dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php