Hello and welcome to our community! Is this your first visit?
Register
Results 1 to 5 of 5
  1. #1
    lucien is queen Hazzystan's Avatar

    Join Date
    Feb 2008
    Location
    Scotland
    Posts
    2,977

    htaccess problem

    I'm trying to password-protect a page via .htaccess, and it seemed to be working alright until 5 minutes ago.

    Basically I have a file called .htpasswd which contains the username an pass for the page, which looks like this:
    Code:
    username:password
    And I have inserted the following code into my .htaccess file:
    Code:
    AuthUserFile .htpasswd
    AuthType Basic
    AuthName "Page is Password Protected"
    <Files "passwordprotected.php">
    Require valid-user
    </Files>
    But every time I try it out, and put my username and password in it goes straight to "Page not Found", Regardless to whether the login details are right or wrong. Where am I going wrong?
    what is homo love?

  2. #2
    Insanity Skype's Avatar



    Join Date
    Apr 2007
    Location
    England
    Posts
    27,397

    Re: htaccess problem

    Just means the URL to your document is wrong. Try double checking the case and directory. Try putting a / infront.

  3. #3
    lucien is queen Hazzystan's Avatar

    Join Date
    Feb 2008
    Location
    Scotland
    Posts
    2,977

    Re: htaccess problem

    Quote Originally Posted by Skype
    Just means the URL to your document is wrong. Try double checking the case and directory. Try putting a / infront.
    I've tried using all possible file paths, and none of them work. The case is also ok, and both files are in the same directory :\

    Is there any way to declare the username and pass within the .htaccess file?
    what is homo love?

  4. #4
    Insanity Skype's Avatar



    Join Date
    Apr 2007
    Location
    England
    Posts
    27,397

    Re: htaccess problem

    Everything I've read about password protecting with htaccess mentions htpassword.

  5. #5
    lucien is queen Hazzystan's Avatar

    Join Date
    Feb 2008
    Location
    Scotland
    Posts
    2,977

    Re: htaccess problem

    If someone has a website, could they test the code out for me? I'm just wondering whether it's just an error I've made, or if for some reason byethost doesn't support password-protect.
    what is homo love?


 

Posting Permissions

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