954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

.htaccess tutorial , how to upload to server?

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?

opjjuly
Newbie Poster
17 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

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

pritaeas
Posting Expert
Moderator
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

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?

opjjuly
Newbie Poster
17 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

No, looks okay to me.

pritaeas
Posting Expert
Moderator
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: