Thursday, March 27, 2014

The Byte Order Mark

Internal Server Error. The number one symptom of messed up .htaccess.

When you're debugging a longer .htaccess with all of its tasty regular expressions and hard-to-figure-out stuff. Minutes, hours pass, the code is completely rewritten, but does not work. Asking for the help of audience, posting it on Stackoverflow looking for possible answers. Nothing. For some reason replacing the code with one single line even thinking about RewriteEngine being corrupt. It does not work. "Fsck this sht" - deleted the file. A short while later got courage to face the problem again. Created a file. Pasted the code. Works. Wow. Curiousity takes over me, I must find the reason somehow. From the backups, the mystery is now solved. The code was made with an ancient junky editor, that added a Byte Order Mark, and Mr. Apache couldn't defeat it.

No comments:

Post a Comment