Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

help mw with htaccess please!


Recommended Posts

Okie, after some struggle I think I just make a right .htaccess which is like this:

AuthUserFile /home/webspace/httpdocs/.htpasswd
AuthType Basic
AuthName "Secret Place"
require valid-user

put it in myPhpAdmin folder

then I put .htpasswd which is like this:


password is admin, just to test!!!

put it in httpdocs folder

But I couldnt login at all, keep getting the error Authorization Required!!!

Please tell me where did i make it wrong!!!!


my link here:


(just a test site now)

Link to comment
Share on other sites

Ehhm...you give the absolute path in your .htaccess file (o;


AuthUserFile /usr/local/etc/apache2/users



Use htpasswd for changing passwords...


"htpasswd file username"


btw: I use "vi" for editing text (o;


Using editors with DOS linefeeds is a bad idea for UNIX systems (o;


You might want to check out the free "crimson editor" for windows...supports DOS/UNIX linefeeds and has built-in ftp client and also syntax highlighting!!

Link to comment
Share on other sites

yup. i know i have to give the abosolute path, buth since this is not my host and i'm setting up the site for my friend, i'm not really sure that the path is correct and i cant contact him now! Is there any code to display the path or something like that?

Link to comment
Share on other sites

I finally fixed it, oh my god!

I create a php file


echo "PHP test<pre>";


print $MY_AUTH;

echo base64_decode( substr($MY_AUTH,6));


upload onto my server the run it, and i found down the real path wich is like this:



So it's done, i fixed the path in htaccess and it work like a charm!


Thanks you guys so much for helping me!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...