I am new in php coding. I just want to access a restricted index.php page through login username and password.
My folder/file listing are...
root-index.php
root/admin/index.php
I want to access ../admin/index.php from site root/index.php through valid username and password but if I want to access ../admin/index.php through browser addressbar, it will not be accessed or show message "Direct access is denied" or show error page (404).
I have tried putting .htaccess file inside the admin folder. but I failed to get the ../admin/index.php and it is showing error page.
my .htaccess file contains...
Order deny,allow
Require valid-user
I tried like joomla restriction in root/admin/index.php
//// No direct access.
defined('_JEXEC') or die;
but I really don't know how to bypass the above coding so the page is dying.
Can anybody help me on this matter ?
for your kind information, I am using Dreamweaver cs5 for coding and designing.