Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
Thread: .htpasswd issue
11-19-2007, 11:28 AM #1
Hi I have a site locally at
I have a .htpasswd file at C:\xampp\password\
the .htpasswd file contains wsabstract:y4E7Ep8e7EYV
My .htaccess code is stored at
Options -Indexes DirectoryIndex index2.php AuthName "Section Name" AuthType Basic AuthUserFile C:/xampp/password/.htpasswd Require valid-user
11-19-2007, 03:48 PM #2
- Join Date
- Dec 2004
- In a place far, far away...
- Thanked 1,043 Times in 1,019 Posts
The password can't be encrypted if you are running xampp on windows. Everything else looks fine though. Try this
Code:AuthName "Section Name" AuthType Basic AuthUserFile C:/xampp/password/.htpasswd Require valid-user Options -Indexes DirectoryIndex index2.php
Users who have thanked _Aerospace_Eng_ for this post:
11-19-2007, 04:44 PM #3
- Join Date
- Mar 2007
- Thanked 2,223 Times in 2,210 Posts
- Blog Entries
I've done this in windows, but missed the tutorial link. Anyway I think the steps are as follows.
0)Backup your xampplite\apache\conf\httpd.conf
1) Add the below portion in to this
under a lineCode:AccessFileName .htaccess <Directory "/xampplite/htdocs/myfolder/admin"> AllowOverride All Options None Order deny,allow </Directory>
2) Take command promt and run
this will create a .htpasswd file in your working directory.Code:xampplite\apache\bin\htpasswd.exe -c .htpasswd username
3)Copy this file to htdocs/myfolder/admin
4)then create a .htaccess file in your folder to be protected having something like
(Change folder name to fit to your system)Code:AuthUserFile C:/xampplite/htdocs/myfolder/admin/.htpasswd AuthName "This is protected area" AuthType Basic <Limit GET POST> require valid-user </Limit>
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
Users who have thanked abduraooft for this post:
11-19-2007, 07:03 PM #4
Well done Aero, that worked nicely, although I'm not sure why it made a difference.
Also thanks to abduraooft where your post could really help me in the future.