{"id":378,"date":"2012-12-12T10:50:54","date_gmt":"2012-12-12T05:50:54","guid":{"rendered":"http:\/\/www.zubair.info\/blog\/?p=378"},"modified":"2019-08-13T19:53:43","modified_gmt":"2019-08-13T14:53:43","slug":"500-internal-server-error-caused-by-editing-htaccess-file","status":"publish","type":"post","link":"https:\/\/www.zubair.info\/blog\/2012\/12\/12\/500-internal-server-error-caused-by-editing-htaccess-file.html","title":{"rendered":"500 Internal Server Error caused by editing .htaccess file"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.zubair.info\/blog\/wp-content\/uploads\/2012\/12\/500-internal-server-error-caused-by-editing-htaccess-file.jpg\" alt=\"500 internal server error caused by editing htaccess file500 internal server error caused by editing htaccess file\" width=\"500\" height=\"200\" class=\"alignnone size-full wp-image-383\" srcset=\"https:\/\/www.zubair.info\/blog\/wp-content\/uploads\/2012\/12\/500-internal-server-error-caused-by-editing-htaccess-file.jpg 500w, https:\/\/www.zubair.info\/blog\/wp-content\/uploads\/2012\/12\/500-internal-server-error-caused-by-editing-htaccess-file-300x120.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/> Just wanted to write a quick post about why you might get a <code>\"500 Internal Server Error\"<\/code> message after editing your  .htaccess file. This happened to me a few days ago, but i just ignored this message and used some work-around (can&#8217;t remember what exactly i did during that time). But i wanted to find the real issue behind this error as it was getting annoying having to encounter it more often.. I was able to pin-point the cause of the problem in matter of a few seconds. But the weird thing is that i first tried doing a quick search for &#8220;500 Internal Server Error caused by editing .htaccess file&#8221; on Google; which was a very specific search, but i couldn&#8217;t find anything specifically related to my issue. I am sure i would have eventually ended up with a good result, but time was a factor here \ud83d\ude42 So that is the reason behind this post, I&#8217;m writing this for future reference and in case anyone else who might stumble upon this issue. OK, I know; Enough talk. The issue was the <strong>character encoding<\/strong> of the file. I was using the Komodo IDE instead of of my usual Notepad+, I noticed my Komodo was setup to save all files in the <code><strong>UTF-8 character encoding<\/strong><\/code>; so i decided to change the file encoding to <code><strong>Western European CP1252<\/strong><\/code>, then saved the file again and BOOM! It worked \ud83d\ude42 Please let me know if this helped you \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just wanted to write a quick post about why you might get a &#8220;500 Internal Server Error&#8221; message after editing your .htaccess file.<\/p>\n<p>This happened to me a few days ago, but i just ignored this message and used some work-around (can&#8217;t remember what exactly i did during that time). But i want to find the real issue behind this error and was able to pin-point the cause in matter of a few seconds.<\/p>\n","protected":false},"author":1001009,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[76,77,79,81,78,80,41],"class_list":["post-378","post","type-post","status-publish","format-standard","hentry","category-apache","tag-500-internal-server-error","tag-apache-2","tag-character-encoding","tag-file-encoding","tag-htaccess","tag-komodo","tag-troubleshooting"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.zubair.info\/blog\/wp-json\/wp\/v2\/posts\/378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zubair.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zubair.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zubair.info\/blog\/wp-json\/wp\/v2\/users\/1001009"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zubair.info\/blog\/wp-json\/wp\/v2\/comments?post=378"}],"version-history":[{"count":0,"href":"https:\/\/www.zubair.info\/blog\/wp-json\/wp\/v2\/posts\/378\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zubair.info\/blog\/wp-json\/wp\/v2\/media?parent=378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zubair.info\/blog\/wp-json\/wp\/v2\/categories?post=378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zubair.info\/blog\/wp-json\/wp\/v2\/tags?post=378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}