I have a file named news.xml in my public_html directory.
When I try to access the file using:
http://mydomain.etc/news
It opens the news.xml file instead of showing 404 (since there's no directory named news/)
This is bit problematic because I use mod_rewrite to rewrite URLs, and it rewrites:
http://mydomain.etc/news
into:
http://mydomain.etc/index.php?p=news.xml
Whereas it should just be:
http://mydomain.etc/index.php?p=news
When I rename or remove news.xml it works fine.
Does anyone know what option in Apache causes this? It didn't happen on our old server (non DirectAdmin server), but it does on new, and I really don't want to start changing the file/dir structure for all the dirs where this happens. I browsed through httpd.conf quickly, but nothing that could cause this caught my eye, but I probably just missed something.
Any ideas?
Thanks.
EDIT. After going through the conf file again carefully, I found out that this was caused by the 'MultiViews' options (Part of Apache's content negotiation).
Now my question is, would it be possible to enable this and also make mod_rewrite work correctly? Like would it possible for it to apply MultiView negotiation on the rewritten URL instead of the original URL?
When I try to access the file using:
http://mydomain.etc/news
It opens the news.xml file instead of showing 404 (since there's no directory named news/)
This is bit problematic because I use mod_rewrite to rewrite URLs, and it rewrites:
http://mydomain.etc/news
into:
http://mydomain.etc/index.php?p=news.xml
Whereas it should just be:
http://mydomain.etc/index.php?p=news
When I rename or remove news.xml it works fine.
Does anyone know what option in Apache causes this? It didn't happen on our old server (non DirectAdmin server), but it does on new, and I really don't want to start changing the file/dir structure for all the dirs where this happens. I browsed through httpd.conf quickly, but nothing that could cause this caught my eye, but I probably just missed something.
Any ideas?
Thanks.
EDIT. After going through the conf file again carefully, I found out that this was caused by the 'MultiViews' options (Part of Apache's content negotiation).
Now my question is, would it be possible to enable this and also make mod_rewrite work correctly? Like would it possible for it to apply MultiView negotiation on the rewritten URL instead of the original URL?
Last edited: