Solved

Directories failing to display

Posted on 2002-06-13
2
166 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now