I have created my .htaccess file using notepad, its empty at the moment, im on windows. how do i upload it to my server? do i place the file inside my website directory or outside? and how do i test whether the whole process was successful or not?

Recommended Answers

All 3 Replies

Just put the file in your website root. However, if it is empty, you cannot check anything.

I managed to upload it, but i think my .htaccess feature is not enabled in my host.... :-(. i have created a test folder in my control panel, inside i included a simple index.html file, .htaccess file and .htpasswd inside the .htaccess file i tested with ths script:

AuthType Basic 
AuthName "Members Only" 
AuthUserFile /home/users(me)/wwwroot(publich_html)/test/.htpasswd 
<limit GET PUT POST> 
require valid-user 
</limit>

to give website permissions to authorized users only, and then in the .htpasswd i used: admin:01vokOibos3pg. But the MEMBERS ONLY popup box is not appearing when i navigate to http://www.mywebsite.com/test/index.html , only the html file shows. Any advises?

No, looks okay to me.

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.