Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to stop php files from behaving like folders

Posted on 2006-05-02
4
Medium Priority
?
230 Views
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:

http://www.k2wrpg.org/archive/mantis/wiki/wiki/wiki/archive.php?ID=83

Currently if you go to that url, you get what should be at http://www.k2wrpg.org/archive.php 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: http://www.k2wrpg.org/wiki/index.php/RecentChanges The solution can not break this. I don't think that should be a problem, because  http://www.k2wrpg.org/wiki/index.php is a file that can be found, so anything after that should be treated as parameters as it currently is.

Thanks in advance!

0
Comment
Question by:vtechpilot
  • 2
4 Comments
 
LVL 15

Expert Comment

by:m1tk4
ID: 16586622
>>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.
0
 

Author Comment

by:vtechpilot
ID: 16586847
mod_rewrite is not loaded. There are no aliases like this that i have found in httpd.conf. It affects all php files. so http://www.k2wrpg.org/feeds/gibberish gets you what is normally at http://www.k2wrpg.org/feeds.php.
0
 
LVL 27

Accepted Solution

by:
caterham_www earned 2000 total points
ID: 16589541
Disable MultiViews.

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

Author Comment

by:vtechpilot
ID: 16590898
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
</Directory>
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month20 days, 21 hours left to enroll

810 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