Protecting PHP file & HTML files

Discussion in 'Setting-up protection' started by tekboi, Apr 16, 2009.

  1. tekboi

    tekboi New Member

    Joined:
    Apr 14, 2009
    Messages:
    4
    Hi, I just set-up amember and I'm able to protect folders with no problem. Now what I'm trying to do is protect the a web-page so that only subscribed users have access. The page is actually a php file. I need to protect the FILE ONLY since it's in my main domain folder and moving it would be very problematic.

    How can I do this? seems like aMember only protects folders.
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Use the php_include protection method.

    David
  3. tekboi

    tekboi New Member

    Joined:
    Apr 14, 2009
    Messages:
    4
    Got it. Thanx
  4. muzin

    muzin New Member

    Joined:
    Feb 8, 2011
    Messages:
    1
    Can not protect a html page

    new_rewrite (RewriteRule doesn't work in .htaccess files on this server)


    Anyway to do it if not a folder?
  5. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You can place html page to a folder and protect folder.
    In regards to error, contact hosting support and ask to make sure that:
    1. mod_rewrite is enabled
    2. AllowOverride is set to All in server config for your site.

Share This Page