How to stop php files from behaving like folders

Posted on 2006-05-02
Last Modified: 2010-07-27
This all started with another problem, but I was reviewing the logs for my webserver and i noticed search engine spiders hitting really weird URLs, and not getting 404's For example:

Currently if you go to that url, you get what should be at except the images and CSS items are all broken, but thats not the point. The point is that the URL points to a folder named archive and there is no such folder, so to me this URL should 404.

now here is the tough part. I have a phpwiki on my site see: The solution can not break this. I don't think that should be a problem, because is a file that can be found, so anything after that should be treated as parameters as it currently is.

Thanks in advance!

Question by:vtechpilot
    LVL 15

    Expert Comment

    >>folder named archive and there is no such folder, so to me this URL should 404.

    Not necessarily. This could have been redefined either through Aliases or URL rewrites in your Apache config. I'd start looking from there.

    Author Comment

    mod_rewrite is not loaded. There are no aliases like this that i have found in httpd.conf. It affects all php files. so gets you what is normally at
    LVL 27

    Accepted Solution

    Disable MultiViews.

    Search your httpd.conf (and all included files) for MultiViews and remove it from the 'Options' directive.

    Author Comment

    Ah, the famous caterhamm_www. Ok, so I added the following to my conf file and things now behave as expected. I share the server so I couldn't just make the change global, but MultiViews was exactly what I was looking for.

    <Directory "c:/my_dir">
    Options Indexes FollowSymLinks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now