The Mudcat Café TM
Thread #78265   Message #1406953
Posted By: MudGuard
12-Feb-05 - 03:47 AM
Thread Name: error 403
Subject: RE: error 403
403 Forbidden should be used for urls that exist but will show no result (no index.htm in a folder or similar) to anyone.
404 should be used for urls that do not exist.

Usually, if you ask for a folder with the / missing at the end of the url, the server responds with a
301 Moved Permanently
with an additional Location-header redirecting to the URL with the / added - which the client (browser) usually answers with a request for the new URL.

See for example the following piece of HTTP communication (caught with Firefox's LiveHTTPHeaders extension [no http bodies], I emboldened the important pieces) - note the / or not / at the end of urls/url-parts:

http://www.andreas-waechter.de/IRL

GET /IRL HTTP/1.1
Host: www.andreas-waechter.de
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 301 Moved Permanently
Date: Sat, 12 Feb 2005 08:37:03 GMT
Server: Apache/2.0.45 (Win32) PHP/4.3.6
Location: http://www.andreas-waechter.de/IRL/
Content-Length: 347
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
----------------------------------------------------------
http://www.andreas-waechter.de/IRL/

GET /IRL/ HTTP/1.1
Host: www.andreas-waechter.de
[...]