SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    apache adding trailing slash when dir exists

    Hi All

    What is the name of the feature in apache which converts
    www.mysites.com/my/dir
    to
    www.mysite.com/my/dir/

    Apache is auto adding the trailing slash if the directory exists although i would like to know what the feature is called as it caused me a few issues as apache used the servername and not http_host. I have resolved this in apache although i'm interested to know the features name and to see if I can turn the whole feature off via
    Options -FEATURENAME

    Thanks in advance

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    php,

    I attempted a search at apache.org for the specific command which would allow/deny this capability. I couldn't find it.

    IMHO, this is an extension of the Apache core features which is similar to MultiViews (in reverse) in that, if the directory can't be found (as a file), Apache adds the path separator (/) to the {REQUEST_URI} and looks for the directory with that name BEFORE giving up and requesting the 404 script.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  3. #3
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply and for having a look.

  4. #4
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,271
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    DirectorySlash, part of the core mod_dir. ??

  5. #5
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Mallory,

    Great find! Thanks!

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •