how do i protect root domain?

Discussion in 'Setting-up protection' started by vchavez, Jul 18, 2007.

  1. vchavez

    vchavez New Member

    Joined:
    Jul 12, 2007
    Messages:
    7
  2. parkerj

    parkerj aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    23
    If your domain is http://www.domain.com/index.php, all you need to do is add the following code to the index.php file:
    Code:
    <?php 
    $_product_id = array(1,3); // or $_product_id = array(1) if it so
    include("/var/www/username/web/amember/plugins/protect/php_include/check.inc.php"); 
    
    .. your existing PHP code goes here
    ?>
    
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Yes but even better you need to move all files to any folder and protect it.
    Then create index file that will redirect user to that folder:
    <?php
    header("Location: /url/");
    exit;
    ?>

Share This Page