Forum Moderators: phranque

Message Too Old, No Replies

.htaccess question (simple I think)

allowing access to directory from single upstream page

         

captdavid

2:09 am on Mar 19, 2008 (gmt 0)

10+ Year Member



Have what I think is a simple problem but like the jitterbug it's so simple its plumb evading me..

Have PHPBB located in directory mydomain.com/members/phpbb
Access to /phpbb via mydomain.com./members/forum.php
forum.php is nothing but a single frame page ie:


<?php
/* --------------------------
* PHPLOGIN RESTRICTION CODE
* --------------------------*/
require ( '/chroot/home/mydomain/php-bin/phplogin/settings.php' );
$login->checkLogin ( '1 2' );
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
</head>
<frameset>
<frame src="phpbb/">
</frameset>
</html>

members/forum.php is protected by PHPLogin

Need to set up .htaccess in members/phpbb/ to allow forum.php to load the pages contained therein, but denying access directly, eg:
[mydomain.com...]

Have tried


Order Deny,Allow
Deny from All
Allow from mydomain.com

and

Order Deny,Allow
Deny from All
Allow from <domain ip address>

Neither of which allows access from /members/forum.php

Suggestions?

TIA
David

jdMorgan

2:35 am on Mar 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You are asking the impossible: Since you are using a frameset, it is the client browser which loads the phpbb pages, not PHP itself.

You may use a PHP include to read the content of files into the current page being generated by PHP. In that case, no HTTP access to the directory need be allowed at all.

Jim

captdavid

2:41 am on Mar 19, 2008 (gmt 0)

10+ Year Member



Thanks Jim Question answered

David