Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can we allow site users to view contents of subdirectory using .ht

Status
Not open for further replies.

akgta

Programmer
Jul 18, 2007
42
CA
How can we allow site users to view contents of subdirectory using .htaccess or any other way.

at this moment its giving the following error:
500 internal server error

i want the users to see the files of the directory

thanks
 
Remove any "index." files or any other files that meet your defined DirectoryIndex definitions.

Folders that do not have an index.htm, index.html, index.php (etc.) will show their folder contents much like an FTP server would.



D.E.R. Management - IT Project Management Consulting
 
Depending on the configuration of higher level directories, you might need to add an .htaccess file that contains at least:

Options +Indexes

and in the directory container, you might need:

AllowOverride Indexes
 
Here is the sample configuration:

AuthType Basic
AuthName "This is a Private Network Please Enter Your Password"
AuthUserFile /var/Require user john robert

And to create .htacess you need to run:

$htpasswd -c [file_name] [user_name]

In this case it should be look like this:

$htpasswd -c .htaccess john

$htpasswd -c .htaccess robert


Hope It Helps;

--ilker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top