Password protect a directory but make it accessible to call files
Posted by: overkil6 (---.home1.cgocable.net)
Date: February 12, 2008 04:47PM

Hello,

Yesterday I posted a message about being able to password protect a directory because I have scripts within them. I'm not using a .htaccess file to do so. However, any PHP file calling the scripts within this folder are prompted for a username and password.

Does anyone know of a solution around this so that the directory is still secure and the files can be called seemlessly. I suppose I could protect the files with PHP and user rights but I am seeing if there is another solution first...

Many thanks!

Options: ReplyQuote
Re: Password protect a directory but make it accessible to call files
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: February 12, 2008 05:03PM

hi i was helping u yesterday.. u just wrote are not using a .htaccess file.?

u are or u are not?

Options: ReplyQuote
Re: Password protect a directory but make it accessible to call files
Posted by: overkil6 (---.home1.cgocable.net)
Date: February 12, 2008 05:08PM

Sorry - I AM using the .htaccess file. Fingers slower then my mind smiling smiley

Options: ReplyQuote
Re: Password protect a directory but make it accessible to call files
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: February 12, 2008 05:29PM

ok

well its just like apache config files



in ur .htaccess file put this


order deny,allow
deny from all
allow from localhost





this will allow scripts thru
dont use any names or passwords this way, the folder in not accessible from web

Options: ReplyQuote


Sorry, only registered users may post in this forum.