httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay O'Brien <jayobr...@att.net>
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, 192.168.1.9. 
This is my first experience with running Apache.

On a WinXP Pro computer on my local LAN, using Mozilla V1.7.2, I 
type http://192.168.1.9 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, http://192.168.1.9/rl (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 192.168.1.9. 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, 66.93.180.184. 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 http://66.93.180.184 into the browser over the 
internet, I get /home/jay/www/home.html as expected. However, 
entering http://66.93.180.184/rl doesn't work; Mozilla times out 
and displays "The operation timed out when attempting to contact 
192.168.1.9". However, if I add the trailing slash, typing 
http://66.93.180.184/rl/ displays  /home/jay/www/rl/home.html as 
expected. http://66.93.180.184/sscc without the trailing slash 
also fails; as before, it works fine with the trailing slash. 

However, if I enter http://66.93.180.184/tech 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 http://66.93.180.184/rl, 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 192.168.1.9, 
not 66.93.180.184 as would be expected over the internet.

In httpd.conf, I have ServerName set to 66.93.180.184, 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 192.168.1.9.

Following http://httpd.apache.org/docs/misc/rewriteguide.html
I tried the following:

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

Built /home/jay/www/.htaccess:
RewriteEngine  on
RewriteBase    /66.93.180.184/
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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message