Most webmasters edit their .htaccess files using a .txt editor like Notepad.
I recently was hit by an mysterious bug. As soon as I had uploaded my .htaccess file to a new host, the site gave a 500 Error.
Removing the htaccess file would make the site work again.
After hours of research, it turned out that one of the 301 redirects had a very long target url (more than 300 characters). Because of that long url, my .txt editor (AkelPad) was adding an invisible line break between the source and the target urls of the 301 redirect. That line break alone was bringing my entire site down.
The meaning of that is: do not use any .txt editor to edit your .htaccess files. Use an editor that allows you to see and control the invisible characters, like e.g. line break.
Precisely CSE HTML Validator is one such editor. Just open your .htaccess file using CSE HTML Validator and make sure that View -> Editor -> Special Symbols is checked.
Hope that helps!
For technical support for all editions of CSS HTML Validator. Includes bug reports.
1 post • Page 1 of 1