bmwiz
bmwiz

Reputation: 11

Apache stripping comments from html

I have a deployment where Apache forwards to Tomcat running on the same system. I'm running into a situation where Apache is stripping out comments in html returned by Tomcat. This is causing lines like the following to be removed causing the js to fail on IE:

"<!--if IE><script language="javascript" type="text/javascript" src="/scripts/excanvas.js"></script><!endif>"

I have mod_rewrite, mod_proxyhtml and of course proxy_ajp. I tried adding "ProxyHTMLStripComments Off" but that doesn't seem to help.

What am I missing ?

Upvotes: 1

Views: 915

Answers (1)

Fatih Demir
Fatih Demir

Reputation: 55

I know that your question is ancient, but for the people who are struggling with this issue i have the following solution:

Apache proxy html rewrites html following the guidelines specified by the html standard you are using. If you are using your proxy for a modern site i suggest you specify the Doctype by adding ProxyHTMLDocType "<!DOCTYPE html>"

This will ensure that your html is rewritten accordingly.

Upvotes: 1

Related Questions