Solved

Directories failing to display

Posted on 2002-06-13
2
171 Views
Last Modified: 2010-03-04
I am running Apache on RedHat 7.2 i386 platform.
I have directory Indexes turned off.
I have my DirectoryIdex set up correctly.
When I attempt to view my site I am immediately brought to the correct page.
However, once on the site if I try to get to a directory like:
http://mysite.com/directory
I get a 404 error.
But if I attempt to get to the directory by:
http://mysite.com/directory/
the default page for that directory displays.

Now say that another directory is password protected. If I attempt to get there by:
http://mysite.com/anotherdirectory
I am asked for the password, but no default page is displayed.

I want to be able to type in the directory without the trailing / and be brought to the directories default page. What is wrong with my configuration?

Thank you in advance,

Chris
0
Comment
Question by:bugsuperstar37
2 Comments
 
LVL 15

Accepted Solution

by:
samri earned 200 total points
ID: 7077068
Chris,

You have hit the "trailing slash problem".

There are several possible fixes that is documented;
(I rather post the link than doing cut-and-paste).

- ServerName directive
Make sure you set the ServerName to the the actual servername that client is accessing.
From Apache FAQ;
http://httpd.apache.org/docs/misc/FAQ.html#set-servername

- mod_dir
Make sure the mod_dir.so is loaded in httpd.conf

From Apache docs;
http://httpd.apache.org/docs/mod/mod_dir.html

- mod_rewrite
http://httpd.apache.org/docs/misc/rewriteguide.html
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7080198
and your
   Options
directive for the appropriate directory/location contains
   Indexes
value too?
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question