{"id":885,"date":"2013-02-06T01:14:58","date_gmt":"2013-02-05T17:14:58","guid":{"rendered":"http:\/\/binaryone.com.au\/?p=885"},"modified":"2023-11-24T06:05:32","modified_gmt":"2023-11-24T06:05:32","slug":"corrupt-htaccess-file-and-internal-server-error","status":"publish","type":"post","link":"https:\/\/binaryone.com.au\/23\/corrupt-htaccess-file-and-internal-server-error\/","title":{"rendered":"Corrupt .htaccess file and Internal Server Error"},"content":{"rendered":"\n<p>Ok So you are working on your wordpress site. Making changes and updating your site when all of a sudden you get&#8230;<\/p>\n\n\n<div class=\"wp-block-ub-content-toggle wp-block-ub-content-toggle-block\" id=\"ub-content-toggle-block-16162e7c-2d3f-4617-b22b-fb9f1211b396\" data-mobilecollapse=\"false\" data-desktopcollapse=\"false\" data-preventcollapse=\"false\" data-showonlyone=\"false\">\n<div class=\"wp-block-ub-content-toggle-accordion\" style=\"border-color: #19294e; \" id=\"ub-content-toggle-panel-block-\">\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-title-wrap\" style=\"background-color: #19294e;\" aria-controls=\"ub-content-toggle-panel-0-16162e7c-2d3f-4617-b22b-fb9f1211b396\" tabindex=\"0\">\n\t\t\t<p class=\"wp-block-ub-content-toggle-accordion-title ub-content-toggle-title-16162e7c-2d3f-4617-b22b-fb9f1211b396\" style=\"color: #f2f2f2; \">Internal Server Error<\/p>\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-toggle-wrap right\" style=\"color: #f2f2f2;\"><span class=\"wp-block-ub-content-toggle-accordion-state-indicator wp-block-ub-chevron-down open\"><\/span><\/div>\n\t\t<\/div>\n\t\t\t<div role=\"region\" aria-expanded=\"true\" class=\"wp-block-ub-content-toggle-accordion-content-wrap\" id=\"ub-content-toggle-panel-0-16162e7c-2d3f-4617-b22b-fb9f1211b396\">\n\n<p>Internal Server Error<\/p>\n\n\n\n<p>The server encountered an internal error or misconfiguration and was unable to complete your request.<\/p>\n\n\n\n<p>Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.<\/p>\n\n\n\n<p>More information about this error may be available in the server error log.<br>Apache\/2.2.18 (Ubuntu) Server at www.yoursite.com Port 80<\/p>\n\n<\/div>\n\t\t<\/div>\n<\/div>\n\n\n<p>Before the panic sets in go to your .htaccess file and check that all is as it should be. For example when this happened to me last time this is what my file looked like.<\/p>\n\n\n<div class=\"wp-block-ub-content-toggle wp-block-ub-content-toggle-block\" id=\"ub-content-toggle-block-0f47fc4b-bb61-4ad6-bacb-17f73e2f1afb\" data-mobilecollapse=\"false\" data-desktopcollapse=\"false\" data-preventcollapse=\"false\" data-showonlyone=\"false\">\n<div class=\"wp-block-ub-content-toggle-accordion\" style=\"border-color: #19294e; \" id=\"ub-content-toggle-panel-block-\">\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-title-wrap\" style=\"background-color: #19294e;\" aria-controls=\"ub-content-toggle-panel-0-0f47fc4b-bb61-4ad6-bacb-17f73e2f1afb\" tabindex=\"0\">\n\t\t\t<p class=\"wp-block-ub-content-toggle-accordion-title ub-content-toggle-title-0f47fc4b-bb61-4ad6-bacb-17f73e2f1afb\" style=\"color: #f2f2f2; \">Corrupt .htaccess<\/p>\n\t\t\t<div class=\"wp-block-ub-content-toggle-accordion-toggle-wrap right\" style=\"color: #f2f2f2;\"><span class=\"wp-block-ub-content-toggle-accordion-state-indicator wp-block-ub-chevron-down open\"><\/span><\/div>\n\t\t<\/div>\n\t\t\t<div role=\"region\" aria-expanded=\"true\" class=\"wp-block-ub-content-toggle-accordion-content-wrap\" id=\"ub-content-toggle-panel-0-0f47fc4b-bb61-4ad6-bacb-17f73e2f1afb\">\n\n<p>BEGIN # BEGIN Wo&lt;IfModul&lt;IfModule mod_rewrite.c&gt; <\/p>\n\n\n\n<p>RewriteEngine On<br>RewriteBase \/<br>RewriteRule ^index.php$ &#8211; [L]<br>RewriteCond %{REQUEST_FILENAME} !-f<br>RewriteCond %{REQUEST_FILENAME} !-d<br>RewriteRule . \/index.php [L]<br>&lt;\/IfM# END WEND WordPress<\/p>\n\n\n\n<p># END WordPress<\/p>\n\n<\/div>\n\t\t<\/div>\n<\/div>\n\n\n<p>notice the first and second last lines<\/p>\n\n\n\n<p># BEGIN # BEGIN Wo&lt;IfModul&lt;IfModule mod_rewrite.c&gt;<\/p>\n\n\n\n<p>&lt;\/IfM# END W<\/p>\n\n\n\n<p>well this means that during the last save your .htaccess file has become corrupt. There are a plethora of reasons why the .htaccess can become corrupt for example the .htaccess above was corrupted when my internet connection dropped out for a few seconds while the file was being written.<\/p>\n\n\n\n<p>So how to fix this problem. You could try correcting the problem lines. If you know what the correct lines should look like. If you don\u2019t know what the corrupted lines should look like you can delete the corrupted .htaccess file all together. Then in the wordpress dashboard open either a post or a page and save it, you don\u2019t even need to make any changes and your .htaccess file will be re written. Simple huh?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ok So you are working on your wordpress site. Making changes and updating your site when all of a sudden you get&#8230; Before the panic sets in go to your .htaccess file and check that all is as it should be. For example when this happened to me last time this is what my file [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[28],"tags":[51,35,46,29],"class_list":["post-885","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-corrupt","tag-htaccess","tag-internal-server-error","tag-wordpress-2"],"aioseo_notices":[],"featured_image_src":null,"author_info":{"display_name":"Allan","author_link":"https:\/\/binaryone.com.au\/23\/author\/allan-cheesman-binaryone\/"},"_links":{"self":[{"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/posts\/885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/comments?post=885"}],"version-history":[{"count":3,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/posts\/885\/revisions"}],"predecessor-version":[{"id":2470,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/posts\/885\/revisions\/2470"}],"wp:attachment":[{"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/media?parent=885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/categories?post=885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/binaryone.com.au\/23\/wp-json\/wp\/v2\/tags?post=885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}