.htaccess error?

Discuss the many weaknesses of browser security and ways to mitigate the threat

.htaccess error?

Post by Okeymaker on Sat Jun 18, 2011 4:36 pm
([msg=58702]see .htaccess error?[/msg])

I have had a lot of problems with .htaccess. I know, htaccess isn´t that hard right? However, I was adviced to ask a website coder so I thought why not ask the guys on HTS?

This is my problem.
I have a test website on http://www.t35.com. Recently, I wanted to learn a way to make sure that my directories can´t be listed. So I played with the thought of using .htaccess. Unfortunately, I have no idea about how to do that except from password protecting the directories OR redirect the directories AND all files within, but I want the files as they are. Therefor I tried to password protect a directory. I placed the .htaccess file in one directory and the .htpasswd in another. (First I tried to put them both in the same directory but when I got my internal server error I tried to put them in different directories just in case. Still error.) I will show you the codes and urls:

This is my fake website url: http://fakealert.t35.com.
THIS is the FULL SERVER PATH for t35.com: /home/freehost/t35.com/d/e/demo/
OKey. My .htaccess is in http://fakealert.t35.com/omgroot. it looks like this:
Code: Select all
AuthName "Private Area"
AuthType Basic
AuthUserFile /home/freehost/t35.com/f/a/fakealert/sub2/.htpasswd
Require valid-user

My .htpasswd file is in sub2. It looks like this:
Code: Select all

What can possible be wrong? I am grateful for all responses for I have no earlier experience of setting up a .htaccess file before and I have tried many times to find the bug/error, but I can´t.

-- Mon Jun 20, 2011 3:04 pm --

Also, if anyone can say that this code is correct, then I will ask my webhost if they really still support .htaccess
User avatar
Experienced User
Experienced User
Posts: 59
Joined: Tue Jan 04, 2011 11:22 am
Blog: View Blog (0)

Return to Web

Who is online

Users browsing this forum: No registered users and 0 guests