This is a very strange problem, and I just hope that I can clearly explain it.
Basically, we made a major update on a client site today, and needed to update some rewrite rules in the htaccess to accomodate the new structure, etc...
So, where we originally had things like:
RewriteRule ^/resources/?$ index.php?id=resources
RewriteRule ^/media/?$ media.php
We changed to:
RewriteRule ^/resources/?$ index.php?id=resources
RewriteRule ^/media/?$ index.php?id=media
But when we visited http://www.example.com/media - it was displaying the old media page. Then, when we removed the old media.php from the document root, we got 404s. Something somewhere is still mapping /media to media.php - and ignoring the rewrite rule.
The weird thing is - all the other rewrite rules in the file are working fine - and there are about 20 or so in there.
We've tracked up and down the vhost and other config files, but can't find any reference to media or the other broken redirects (three in total) - so we're stumped.