Forum Moderators: coopster

Message Too Old, No Replies

How do I refer to .php pages in a passworded sub-dir.

         

jezzer300

5:38 pm on Feb 16, 2005 (gmt 0)

10+ Year Member



My client will soon be editing the main web pages directly.
I'm going to put some php pages into a passworded sub-directory to hide it and protect it from changes.

The main php pages will then just include from the sub-directory like so, (this way the password isn't required for the sub-directory as the page loads):

<?php
include ($_SERVER["DOCUMENT_ROOT"]."/system/admin.php" );
?>

I'd rather not have all these "dummy" files that include files, which could still be deleted / changed.

Is there a way to allow pages to be recalled in the browser using www.#*$!.com/admin.php and the hosted linux server going straight to www.xxx.com/system/admin.php, WITHOUT requiring the password to the /system directory.

Regards,

Jez.

HughMungus

6:03 pm on Feb 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My initial thought is mod_alias/mod_rewrite.

What about requiring a password on each page instead of for the whole subdirectory.

Then you could have the password for each page(s) passed via a mod_alias + query string. Not sure how secure that is, though (I'm sure others can answer that).