The official documentation [1] does not tell that httpd style comments (#) are supported. One has either to try or read source code RewriteValve.java, line 704 to check that. Please update documentation. [1] https://tomcat.apache.org/tomcat-8.5-doc/rewrite.html
Fixed in: - trunk for 9.0.0.M14 onwards - 8.5.x for 8.5.9 onwards - 8.0.x for 8.0.40 onwards 7.0.x and earlier are not affected as the RewriteValve is not present in those versions.