httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay O'Brien <>
Subject [users@httpd] Help with trailing slash
Date Tue, 28 Dec 2004 07:41:30 GMT
I just installed Apache13, on my FreeBSD 5.3-RELEASE-p2 computer, 
and it works fine on my LAN using its fixed local IP, 
This is my first experience with running Apache.

On a WinXP Pro computer on my local LAN, using Mozilla V1.7.2, I 
type into the address field, and I am shown the 
file at /home/jay/www/home.html. This works fine, even though 
there is no trailing slash or filename included in what I type 
into the browser. Again on the LAN, (no 
trailing slash) displays the file /home/jay/www/rl/home.html. 
Using the LAN, I can also reach other home.html files in other 
subtending directories without the trailing slash or filename.

Next I opened port 80 in my Linksys BEFSR41 router, forwarding it 
to On a WinXP Pro computer on another ISP I can now 
get to my home page over the internet, using my fixed public 
internet IP, Note that I am accessing this only via 
the IP number as I have not established a URL to point to my IP 
number. The computer used for tests "over the internet" also uses 
Mozilla V1.7.2. This computer is completely separate from my LAN.

Over the internet I can only use addresses without a trailing 
slash reliably to reach my home page. Most other home.html files 
in subtending directories require the trailing slash. 

That is, If I type into the browser over the 
internet, I get /home/jay/www/home.html as expected. However, 
entering doesn't work; Mozilla times out 
and displays "The operation timed out when attempting to contact". However, if I add the trailing slash, typing displays  /home/jay/www/rl/home.html as 
expected. without the trailing slash 
also fails; as before, it works fine with the trailing slash. 

However, if I enter into the internet 
browser, it gets /home/jay/www/tech/home.html without adding 
the trailing slash!

And, if I use MS Internet Explorer, not Mozilla, I don't need 
the trailing slash to reach /home/jay/www/rl/home.html! I can 
type in, without the trailing slash, and 
it works fine. The address field gets modified by Apache and 
shows the trailing slash. I'm sure this isn't something from 
the computer's cache, as I can change the web page and it 
picks up the change. 

The problem is NOT present with IE, only with Mozilla. And the 
problem is present on some, but not all, subtending directories 
when using Mozilla. When the problem is present, the error 
message says it timed out attempting to contact, 
not as would be expected over the internet.

In httpd.conf, I have ServerName set to, and 
UseCanonicalName Off. I've changed DirectoryIndex to have 
home.html as first choice. I've changed ServerName to a fake 
URL, and it still times out attempting to contact

I tried the following:

Built /home/jay/www/.htaccess:
RewriteEngine  on
RewriteBase    /
RewriteRule    ^rl$  rl/  [R]
This didn't work. 

Built /home/jay/www/.htaccess:
RewriteEngine  on
RewriteBase    /
RewriteCond    %{REQUEST_FILENAME}  -d
RewriteRule    ^(.+[^/])$           $1/  [R]
This didn't work.

The commercial server I use now runs Apache 1.3.31; I don't 
have the trailing slash problem there at all. 

I really want ANY instance of a URL being asked for without 
the final trailing slash to find the home.html file in the 
directory being asked for. 

How do I fix this? I thought it could be because I'm using 
the IP number rather than a URL; However, if I access my 
commercial server by IP rather than URL, it works fine without 
the trailing slash.

Any guidance will be very much appreciated.

Jay O'Brien
Rio Linda, California USA

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message