I've got a setup that has been stable for years. Suddenly I'm getting File does not exist in the apache error log on items that should be getting processed by mod_rewrite.
Last night I did a package update on php/mysql (not apache) but I rolled back and it's still having the issue. .htaccess and apache config hasn't been touched.
I'm still looking for clues but I've got almost nothing so far.
It seems like anything we hit from inside our local network (which is a different network than the one the server is hosted on) never has an issue. If I hit it from my phone off wifi I am seeing the problem sometimes.
All of the File does not exist paths are valid for mod_rewrite to process. I can hit them without issue.
A bit perplexed and at a loss as to what to look for next.
I inherited this config and I've tried not to touch it but here's what we've got for this vhost.
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.domain.com
RewriteRule ^(.*)$ http://www.domain.com$1 [R=301,L]
In the public folder there is also a .htaccess with a lot of config. Here's a relevant chunk:
RewriteEngine On
RewriteBase /
#Correct some bad external links
RewriteRule ^lh$ / [L,R=301]
<FilesMatch "^cart$">
ForceType application/x-httpd-php
</FilesMatch>
I've turned mod_rewrite logging up to 9 and matched one of the requests in the apache error log.
init rewrite engine with requested uri /cart/ViewItem/6054668
applying pattern '^(.*)$' to uri '/cart/ViewItem/6054668'
RewriteCond: input='www.domain.com' pattern='!^www.domain.com' => not-matched
pass through /cart/ViewItem/6054668
[perdir /home/user/domains/domain.com/public_html/] add path info postfix: /home/user/domains/domain.com/public_html/cart -> /home/user/domains/domain.com/public_html/cart/ViewItem/6054668
[perdir /home/user/domains/domain.com/public_html/] strip per-dir prefix: /home/user/domains/domain.com/public_html/cart/ViewItem/6054668 -> cart/ViewItem/6054668
[perdir /home/user/domains/domain.com/public_html/] applying pattern '^lh$' to uri 'cart/ViewItem/6054668'
[perdir /home/user/domains/domain.com/public_html/] pass through /home/user/domains/domain.com/public_html/cart