Password protection for NVU page

2 replies
  • WEB DESIGN
  • |
Hi everybody
Is it possible to protect webpage made in NVU by any password?
If yes - please explain me how (I'm very short-mind in programming and web design)

Thanks a lot
#nvu #page #password #protection
  • Profile picture of the author eric.watson
    You Could us .htaccess?

    Step 1:
    Insert the below code into your .htaccess file, and upload this file to the directory you wish to protect (or which the files you wish to protect is under):

    .htaccess:

    AuthName "Restricted Area"
    AuthType Basic
    AuthUserFile /home/yoursite/.htpasswd
    AuthGroupFile /dev/null
    <Files index.html>
    require valid-user
    </Files>
    <Files page2.html>
    require valid-user
    </Files>
    <Files page3.html>
    require valid-user
    </Files>

    Step 2: Save the below code into a file called .htpasswd, and upload this file to the location as specified in the "AuthUserFile" line above. It contains your username(s) and encrypted password(s). Important: .htpasswd should be put in a non public folder, such as directly above your public HTML folder, to prevent visitors from viewing this file in the browser.

    .htpasswd:
    fred:vYlqMZMl8c3mkSo to recap:
    1. Upload ".htpasswd" to the root or a non publically accessible directory on your server.
    2. Upload ".htaccess" to the directory you wish to protect, and inside this file, verify that the server path to the .htpasswd file above is valid: AuthUserFile /home/yoursite/.htpasswd If you've uploaded the ".htpasswd" file to simply the same directory as your ".htaccess" file (less secure than root directory), then the path would look something like this instead:
      AuthUserFile /home/yoursite/public_html/mydirectory/.htpasswd
    And you're done! Be sure that you've uploaded both files in ASCII, and not binary format.


    Your password is "Jones" and user name is "Fred"
    {{ DiscussionBoard.errors[772430].message }}
  • {{ DiscussionBoard.errors[774815].message }}

Trending Topics