You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Melvin Foong <me...@melvinf.com> on 2008/09/28 02:50:04 UTC

[users@httpd] Trailing slash problem, not the typical one

Hello there,

I am having this problem with my new server where I could not get it to work.

I am looking to request for a page where my URL ends with a trailing slash.

Example

http://domainmame/directory/filename/
This returns me a 404, Apache is looking it as a directory and not a file

My configurations on 3 of my Apache server are the same, however only
1 server running refuse to work with a trailing slash filename.

I do not know what kind of info should I include, just wondering if
anyone had this problem before and had solved it.

Am using Apache 2.2.3

TIA.

Server version: Apache/2.2.3
Server built:   Jan 15 2008 20:33:41
Server's Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

ServerName is specified.

--
Melvin Foong

---------------------------------------------------------------------
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


Re: [users@httpd] Trailing slash problem, not the typical one

Posted by Melvin Foong <me...@melvinf.com>.
Hey Nick Kew,

AcceptPathInfo worked!

Thanks!

-- 
Melvin Foong

On Sun, Sep 28, 2008 at 3:17 PM, Nick Kew <ni...@webthing.com> wrote:
>
> On 28 Sep 2008, at 01:50, Melvin Foong wrote:
>
>> Hello there,
>>
>> I am having this problem with my new server where I could not get it to
>> work.
>>
>> I am looking to request for a page where my URL ends with a trailing
>> slash.
>
> See the AcceptPathInfo directive.
>
> --
> Nick Kew
>
> ---------------------------------------------------------------------
> 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
>
>

---------------------------------------------------------------------
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


Re: [users@httpd] Trailing slash problem, not the typical one

Posted by Nick Kew <ni...@webthing.com>.
On 28 Sep 2008, at 01:50, Melvin Foong wrote:

> Hello there,
>
> I am having this problem with my new server where I could not get  
> it to work.
>
> I am looking to request for a page where my URL ends with a  
> trailing slash.

See the AcceptPathInfo directive.

-- 
Nick Kew

---------------------------------------------------------------------
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


Re: [users@httpd] Trailing slash problem, not the typical one

Posted by so...@apache.org.
On 9/27/08, Melvin Foong <me...@melvinf.com> wrote:
> Hello there,
>  I am having this problem with my new server where I could not get it to work.
>  I am looking to request for a page where my URL ends with a trailing slash.
>
>  Example
>  http://domainmame/directory/filename/
>  This returns me a 404, Apache is looking it as a directory and not a file
>
>  My configurations on 3 of my Apache server are the same, however only
>  1 server running refuse to work with a trailing slash filename.
>
>  I do not know what kind of info should I include, just wondering if
>  anyone had this problem before and had solved it.
>
>  Am using Apache 2.2.3
>  TIA.
>  Melvin Foong

Your expectation is not standard Web behavior -- a final slash implies
a directory name.  The information needed is in httpd.conf (and maybe
.htaccess files if you use them in content directories.)

You might try copying a working httpd.conf to the problem server.
Backup the current httpd.conf in case the installation/configuration
is different enough that the server does not start.

Diff the httpd.conf from this server with a httpd.conf that works as
you want.  DirectoryIndex (default = index.html) sets the filename(s)
delivered when a directory is specified.  DirectorySlash adds a final
slash when missing -- this is the opposite of your issue.  You may
have RewriteRule commands to remove final slashes.

The important file are httpd.conf and .htaccess files in the problem
directory and all parent directories of the problem directory.
Compare these files with the files from a server that works as you
desire.  Post any portions that seem relevant if you need more
assistance.

HTH,
solprovider

---------------------------------------------------------------------
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