Forum Moderators: phranque

Message Too Old, No Replies

Turn on directory indexing

         

Bernard Marx

8:56 pm on Jul 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello.

I am working on a site in a shared hosting environment, and would like to turn on directory indexing for a particular directory (and subdirectories).

I have created an .htaccess file within the directory, containing just this line:

[blue]Options +Indexes[/blue]

..but this results in a 500 Internal Server Error when attempting to browse to the dir (OK elsewhere).

What am I doing wrong?

BTW, there is an .htaccess in the parent dir (root dir). It contains the following (although I doubt it has any bearing):

----------------------------------------------------------

# -FrontPage-

IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>

----------------------------------------------------------

[edited by: Bernard_Marx at 8:58 pm (utc) on July 9, 2006]

coopster

10:44 pm on Jul 9, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You may want to check with the hosting provider (or if they have a control panel) to AllowOverride [httpd.apache.org]. I'm willing to bet this is your issue.

Bernard Marx

3:15 pm on Jul 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In the end I may have to check with them, Coop. However, some use of .htaccess must presumeably be allowed, since an .htaccess file is present in the root dir in the default setup. Also, if what I'm trying to do isn't allowed, I would expect my attempts to be ignored - ie When browsing to a directory path, I'd get a 403 not a 500 (error).

Still, my guess is worse than anybody's!

coopster

3:30 pm on Jul 10, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



No, you may very well be correct. I thought about that after I posted. Something wasn't clicking ;)

Can you view the error logs to see what is causing you the issue?

Bernard Marx

10:49 pm on Jul 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry for the delay - work getting in the way.

It doesn't look like I can view error logs - although I can view the general server log files (after a fashion).

It's a very cheap 'n' easy hosting service that's perfect (generally speaking) for the task. I don't mind putting up with minor inconveniences. Perhaps I'll use an ASP script index page where I need to do this.

Thanks.