url and the trailing slash

Discussion in 'Site & Server Administration' started by fantalimon, Jun 20, 2011.

  1. #1
    It's just been brought to my attention that a slash after a file name or a slash and any random letters after a file name does not go to the errordocument 404 but displays the same page without the formatting.

    For example,
    www.example.com/index.html pages displays fine
    www.example.com/index.html/asdfsf displays the same page with out formatting
    www.example.com/about-us/example.html is fine
    www.example.com/about-us/example.html/opuipi displays page without formatting rather than the custom 404 page.

    How do i rectify this issue? I have looked a rewriting but what i have tested does not work. If anyone could point in the right direction? Thanks in advance.
     
    fantalimon, Jun 20, 2011 IP
  2. stardust.x7

    stardust.x7 Active Member

    Messages:
    369
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    90
    #2
    You can edit that with .htaccess.
     
    stardust.x7, Jun 21, 2011 IP
  3. fantalimon

    fantalimon Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you add AcceptPathInfo Off to the Options or to the virtual host this stops the trailing slash of pages.
     
    fantalimon, Jun 21, 2011 IP