Coldfusion 2018 .htaccess file rewriterule not working for .cfm files, Tomcat AJP13 “reuse is set to
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.cfm?path=$1 [L,QSA]There is an index.cfm in the /reports/ folder that loads a list of all manufacturers, if one is not specified in ?path=
The rewrite is working on my dev server, and my staging server, but on my production server I get an error from Tomcat:
HTTP Status 403 – Forbidden Type Status Report Description The server understood the request but refuses to authorize it. Apache Tomcat/9.0.21
I'm on CentOS 7 with Apache 2.4.
The .htaccess file is part of the source code.
I have another site on the server that uses a RewriteRule in the vhost.conf file and that works fine in dev, staging and production.
If I change the RewriteRule to this, it redirects fine.
RewriteRule ^(.*)$ https://google.co.uk [L,QSA]
If I visit the page directly (/reports/?path=BMW/) the page loads fine.
The only thing I've been able to find is the mod_jk.log has this error when I try to load the BMW (or any other) report:
[warn] ajp_process_callback::jk_ajp_common.c (2245): (cfusion) AJP13 protocol: Reuse is set to false
The error is only on the production server, not the dev or staging servers. Does anyone have any idea what "Reuse is set to false" means? And if that's related to something that would stop my RewriteRule from working?
I've tried searching the Tomcat source code and I can't find "reuse is set to false"
I've found a "DisableReuse" flag in the Tomcat docs, but I can't find mention of that on dev, staging or production servers.
I tried setting JkOptions -DisableReuse in /etc/httpd/conf/mod_jk.conf and restarted Apache, that made no difference.
I can't find the difference between the 2 working servers and the one failing to rewrite to CFM pages, other that the "reuse is set to false" log entry.
- Coldfusion 2018,0,10,320417
- Amazon Coretto (Java) 11.0.8
- Tomcat 9.0.21.0
- Apache 2.4.6
- Centos 7.7.1908
