Page 1 of 1

XAMPP security

PostPosted: 07. September 2011 12:16
by debasishkanhar
Hi,

I know we can set password to a sub directory using .htaccess file.
But i was wondering is there any way, like i can access the contents of the file from another webpage without being prompted for loging in.
But when i visit the folder explicetely using address, m asked to login.

EG:
Suppose the subdirectory is site.
and main page, index.php.(contains statement: include("site/xyz.php"); )
So dont want to be prompted for password when i enter: localhost/xampp/index.php
But password should be entered when someone enters : localhost/xampp/site
Any suggestions?

Thanks in advance.

Re: XAMPP security

PostPosted: 15. September 2011 14:54
by glitzi85
You didn't try what you supposed, did you?
The php include function is working on the filesystem level (if the include does not start with a web protocol like http://). Therefore no Apache restriction is effective here!

glitzi