#1 May 1, 2012 9:46am

benplum
Administrator
Registered: March 30, 2012
Posts: 54

Locking Down Your Development Site

If you ever need to keep prying eyes from your BigTree site during development, but don't want to mess with directory access, use this simple snippet:

if (!$_SESSION["bigtree"]["id"]) {
	die("ACCESS DENIED: Please log in to view this page.");
}

This will keep users who are not logged into BigTree from viewing your site. Simply create a file named check-login.php containing those three lines in your custom/inc/required/ directory. You can also lock down individual pages or sections by adding those lines to the top of your template. You may want to switch out the die() statement for a hard redirect if blocking access to a section of a live site.

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.