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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apache_1.3.22 - needs trailing slashes?

Status
Not open for further replies.

linuxtricks

IS-IT--Management
May 24, 2000
111
US
Help!

I have built a new webserver on Redhat 7.2 using apache_1.3.22.

It seems that I need to let the server know to look for the index.html file within folders.

When I go to:


I get halted with a "page cannot be found". But when I go to:


the page loads up fine. =(

I have the following line already in my httpd.conf.

[red]<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>[/red]

But, I'm really not sure if that line is my problem.




I admit, I'm confused! Help! =\ ---
Try not. Do. Or do not. There is no try.
 
If you type a &quot;/&quot; at the end, does that work? For example, if you typed &quot; If it does then you have a slash at the end of the path of your directory container and you would be forcing the use of the slash.
 
Yes. It does work when I add the trailing slash.

Is there a way to configure httpd.conf so the server doesn't need to see a trailing slash at the end of an address? Does the ability to automatically add a trailing slash and look for an index.htm(l) file rely on the web browser used on the client?

i.e. it works when I test it with an IE6 client but it does not work with versions less than IE6.

Is there a way to configure httpd.conf so that it does not require the trailing slash no matter what web browser is used to access the page?

Has anyone else experienced this?
(sorry so many questions) ---
Try not. Do. Or do not. There is no try.
 
Check out this sample dir container:

<Directory &quot;/var/ <----(NOTICE - NO TRAILING SLASH)
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

If you use a trailing slash in the definition, it WILL be required by the client.
 
Any idea what the solution to this is? I have the exact same problem with Apache 1.3.19 running on Windows 2000 Professional. I can't seem to find the answer anywhere...

thanks,
damaster
 
The above posts assume the these 2 lines exist in httpd.conf and are uncommented.

LoadModule dir_module modules/mod_dir.so

AddModule mod_dir.c

The following directive defines the name of the directory index. (i.e. index.htm, index.html, index.shtml, index.php, default.html) and so on. You can add as many as you want on this line. Apache will serve the 1st match it comes to when it reads a directory so in that case the order does matter.

<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>

If this doesn't work, then you might check to see if html is defined in mime types.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top