Results 1 to 2 of 2

Thread: .htaccess not working

  1. #1
    Join Date
    Jan 2008
    Posts
    2

    .htaccess not working

    Hi,

    I have followed a million guides all day and even though i am absolutely sure that i am doing this right, it wont work!

    I am trying to password protect my assignments at the bottom of my website, which currently sit in a subfolder /assignment

    My .htaccess file is as followed:

    AuthName "restricted area"
    AuthType Basic
    AuthUserFile /var/www/vhosts/numyspace.co.uk/web_users/./home/~unn_t005763S/public_html/assignment/.htpasswd

    require user docs

    and my website is here website

    I wont show my password file.

    I have used the AuthUserFile path as above as my lecturer said this is the correct one. I have also tried just /~unn_t005763S/public_html/assignment/.htpasswd but that doesnt work either.

    The problem i am getting, is when i type in the user and password on the proected page and hit enter, a new form comes up asking me to enter it again!

    Whys it doing that? It has correct permissions too.

    I been working on this since 11am this morning and im losing patience

  2. #2
    Join Date
    Feb 2007
    Location
    Ireland
    Posts
    1,007
    Without looking at any sort of reference, I will say that two things could be wrong.

    You are using the wrong absolute path to the .htpasswd file, or the passwords in the .htpasswd file are unreadable. :-) If you have direct access to a linux shell, use the htpasswd command to generate the proper user and password combination, if not use a free site on the web. I find that they sometimes don't work that way though.

    Also change this:
    /var/www/vhosts/numyspace.co.uk/web_users/./home/~unn_t005763S/public_html/assignment/.htpasswd

    To this:
    /var/www/vhosts/numyspace.co.uk/web_users/home/~unn_t005763S/public_html/assignment/.htpasswd
    “The best thing about a boolean is even if you are wrong, you are only off by a bit.”

Similar Threads

  1. .htaccess www-redirect screwing up my addon domains
    By David Bowley in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 09 Oct 2008, 10:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •