Use CSE HTML Validator to edit .htaccess

For technical support for all editions of CSE HTML Validator. Includes bug reports.

Use CSE HTML Validator to edit .htaccess

Postby markwolk » Mon Apr 16, 2012 11:07 pm

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! :D
Mark Wolk
markwolk
Rank III - Intermediate
Rank III - Intermediate
 
Posts: 50
Joined: Mon Jul 04, 2005 3:11 am

Return to CSE Tech Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests