0

I have a .htaccess fil on a Apache22 server.

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php?p=$1 [L]

The idea is when the request is /testpage it should be rewritten to /index.php?p=testpage. The problem is that apache does a write before my file, so the actually request is testpage.xml which actually does exists. Therefore, the first RewriteCond is newer true, and my rewrite rule is never applied on the /testpage request.

So, apache is rewriting /testpage => /testpage.xml before my .htaccess-files is activated. A modrewritelog does also say that the requested file is /testpage.xml.

There server should be a standard setup on a FreeBSD server. I know this work on other servers.

1 Answers1

0

I'm guessing that you have Options MultiViews on, and mod_negotiation is handling the request before mod_rewrite gets to it.

200_success
  • 4,701
  • 1
  • 24
  • 42