I am getting 500 internal server error; here is my .htaccess code

AuthName "admin"
AuthUserFile "/home/machiner/.htpasswds/public_html/passwd"

# mod_pagespeed configuration - Do NOT modify the contents
<IfModule pagespeed_module>
    ModPagespeedDomain *
    ModPagespeed on
</IfModule>
# End of mod_pagespeed configuration- Do NOT modify the contents

AuthUserFile "/home/machiner/.htpasswds/public_html/passwd looks a bit iffy to me (I could be wrong, very easily!). Should it beAuthUserFile "/home/machiner/public_html/passwd/.htpasswds perhaps?

Actually I changed my hosting.. and my home directory is /home/machiahd

So, I'm guessing that it should be: AuthUserFile "/home/machiahd/public_html/passwd/.htpasswds

However, if you want to be sure of the path, create a file called path.php and put this in it:<?phpecho realpath("path.php"); ?>

Upload it so that it is in the same directory as your .htpasswds file and then browse to it. You will see the necessary path detail. You will need to remove path.php from the string before you use it of course.

hope this helps,

Simon.
`

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.