Link to home
Start Free TrialLog in
Avatar of vtechpilot
vtechpilot

asked on

How to stop php files from behaving like folders

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!

Avatar of m1tk4
m1tk4
Flag of United States of America image

>>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.
Avatar of vtechpilot
vtechpilot

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of caterham_www
caterham_www
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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>