我的mod重写规则出了问题。它们工作正常,除非在URL中传递.php文件名。在这种情况下,我的规则被忽略,我得到一个文件未找到错误。
Apache 2.4 conf
<VirtualHost *:80>
ServerAdmin postmaster@xxx.xxx
DocumentRoot /srv/www/development.x.nl/x/html
ServerName development.x.nl
ErrorLog /var/log/apache2/development.x.nl-error.log
CustomLog /var/log/apache2/development.x.nl-access.log combined
Header always append X-Frame-Options SAMEORIGIN
ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/run/php/php7.0-fpm.sock|fcgi://127.0.0.1:9000/srv/www/development.x.nl/x/html/
DirectoryIndex index.php
<Directory />
Options None
AllowOverride None
</Directory>
<Directory /srv/www/development.x.nl/x/html>
AllowOverride Authconfig Limit FileInfo Options Indexes
Options Includes MultiViews FollowSymLinks
Require all granted
</Directory>
</VirtualHost>
.htaccess文件(位于/srv/www/development.x.nl/html/public
RewriteEngine on
RewriteRule ^([0-9]*)/(.*)$ /public/index.php [B,NE,L]
RewriteRule ^browse/([0-9]*)/(.*)$ /public/content.php?ts=$1&url=$2 [B,NE,L]
RewriteRule ^latest/(.*)$ /public/today.php?url=$1 [B,NE,L]
这曾经在mod_php上正常工作
我在这里缺少什么?