1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Apache treats files as folders

Discussion in 'Apache' started by costy81gl, Mar 5, 2014.

  1. #1
    I have just discovered in my access log some people accessing urls like this:
    domain.com/index.php/index.php/ or even
    domain.com/index.php/index.php/index.php

    I have opened those links in browser and they worked. Why?
    My .htaccess is empty and i have no 'index.php' folder. But I do have 'index.php' file.

    I think this is happening to most php sites, not just mine. This is a random example:
    http://phptester.net/index.php/
    http://phptester.net/index.php/index.php/index.php

    My question is how to force apache to return 404 error when such url is accessed?
     
    costy81gl, Mar 5, 2014 IP
  2. cesurasean

    cesurasean Active Member

    Messages:
    269
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #2
    Check your apache configuration virtual hosts. Also, if you don't mind, please post your config on here so we know what we are working with.
     
    cesurasean, Mar 6, 2014 IP