Why you shouldn’t use HTML comments that begin with a # (hash) symbol on Apache

Published March 5th, 2008

…because it mistakes them for mod_include directives (if it’s enabled) and attempts to parse them as such. When this fails, it replaces them with the text ‘[an error occurred while processing this directive]‘.

So don’t do this, for example:

<!-- #1 -->
First

<!-- #2 -->
Second

<!-- #3 -->
Third

Oops.

Get a Trackback link

No Comments Yet

Be the first to comment!

Leave a comment

Comment Policy: First time comments are moderated. Please be patient.

OpenID

Anonymous