hi all, i have to edit . htaccess file for my new server i tried with some htaccess generator but i can't find the problem help me
So you want to change the htpasswd file. You should use the 'htpasswd' utitlity for it. More info: http://httpd.apache.org/docs/1.3/programs/htpasswd.html http://www.colostate.edu/~ric/htpass.html Here is a little more info and an online generator that will generate entries in different formats: http://www.askapache.com/online-tools/htpasswd-generator/
You need to start by creating a new .htpasswd file for your site. You can do this by logging into your server over SSH (you may need to contact your web host to set this up). Once connected via shell, you'll change to the directory your site is in on the server and run a command similar to this one: htpasswd -c .htpasswd bobby You'll of course substitute your username where it says bobby above. Now you'll create a file called .htaccess with the following in it: AuthUserFile /path/to/my/site/.htpasswd AuthName "Title for Protected Site" AuthType Basic Require valid-user You'll replace /path/to/my/site with the actual path on your server to your site (you can see this by issuing the command pwd while in your site root). You'll also replace "Title for Protected Site" with the message you want to show up for your password protection.