How do I password protect a folder?

There are several ways to password protect a directory, the easiest (and the way that works with PHP and non-php files) is to use an .htaccess file. The control panel has an .htaccess generator that will create these for you.

For creating .htaccess files look under Util->Protect Files->Generate .htaccess file

There are some disadvantages to the .htaccess approach, for example, the password sharing feature won't work. (this is because GenieGate "looses control" during an .htaccess session)

Password Protecting a single file

The control panel will also generate PHP code that can be inserted into the top of a PHP document. You can use this to password protect an individual file if you like. There is a tool that will generate this code for you. Simply select: Util->Protect Files->Generate PHP code and place the generated code near the top of a PHP file for automatic password protection.

Using the "PHP Method" of password protecting other files

If you would like to password protect a non-php file, you can do this with PHP's readfile() function, here is a sample.

	<?php 
	require("/home/user/geniegate/login.php");
	readfile('/home/user/private/sample.html'); 
	?>
	

Care has to be taken to ensure "sample.html" is kept away from web space (to prevent someone from bypassing the password protection)