{"id":1068,"date":"2013-06-19T08:46:44","date_gmt":"2013-06-19T13:46:44","guid":{"rendered":"http:\/\/blografia.net\/vicm3\/?p=1068"},"modified":"2013-06-19T04:12:13","modified_gmt":"2013-06-19T09:12:13","slug":"legacy-code-everywhere","status":"publish","type":"post","link":"https:\/\/blografia.net\/vicm3\/2013\/06\/legacy-code-everywhere\/","title":{"rendered":"Legacy code everywhere"},"content":{"rendered":"<p>From last weekend our blog <a href=\"http:\/\/blografia.net\/lacobachab\">lacobachab<\/a> where not updating their feed, as I removed and updated wp-cache info, most probably I removed redundant entries on .htaccess, BUT looks like removed the correct ones and left the wrong ones, tip if you don&#8217;t know if your .htaccess mod_rewrite rules are OK, is safe to rm the file, go to Settings \/ Permalink and just save that recreates the rules.<\/p>\n<p>from<\/p>\n<pre>$more lacobachab\/.htaccess\r\n# BEGIN WordPress\r\n\r\nRewriteRule ^index\\.php$ - [L]\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule . \/lacobachab\/index.php [L]\r\n\r\n# END WordPress<\/pre>\n<p>to<\/p>\n<pre>$ rm lacobachab\/.htaccess\r\n$ more lacobachab\/.htaccess\r\n# BEGIN WordPress\r\n\r\nRewriteEngine On\r\nRewriteBase \/lacobachab\/\r\nRewriteRule ^index\\.php$ - [L]\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule . \/lacobachab\/index.php [L]\r\n\r\n# END WordPress<\/pre>\n<p>This caused a headache as from 15th we don&#8217;t get updates on a highly visited entry about our test on <a title=\"La cobacha live\" href=\"https:\/\/blografia.net\/vicm3\/2013\/06\/la-cobacha-live\/\">live streaming<\/a>, bummer.<\/p>\n<p>Also as when you don&#8217;t find the page you are searching for we use the follow a missing.html file that returns to you a meta tag with the http-equiv=\u00bbRefresh\u00bb content=\u00bb0; URL=http:\/\/blografia.net\u00bb sending you back to front page in case you get lost or mistype the url.<\/p>\n<p>So you got to the front page instead of getting an ugly 404 or worse the confusing error that missing.html is missing and 404.<\/p>\n<p>So the real problem was that we where getting missing.html instead of php generated feed or this:<\/p>\n<pre>$ curl -i blografia.net\/lacobachab\/feed\r\nHTTP\/1.1 404 Not Found\r\nDate: Wed, 19 Jun 2013 08:33:26 GMT\r\nServer: Apache\r\nLast-Modified: Wed, 12 Jun 2013 03:49:36 GMT\r\nETag: \"9c-4deece70c017a\"\r\nAccept-Ranges: bytes\r\nContent-Length: 156\r\nVary: Accept-Encoding\r\nContent-Type: text\/html&lt;meta http-equiv=\"Refresh\" content=\"0; URL=http:\/\/blografia.net\" \/&gt;Blografia<\/pre>\n<p>Now fixing the problem<\/p>\n<pre>$ curl -I blografia.net\/lacobachab\/feed\/\r\nHTTP\/1.1 200 OK\r\nDate: Wed, 19 Jun 2013 08:57:51 GMT\r\nServer: Apache\r\nVary: Cookie,Accept-Encoding\r\nX-Pingback: http:\/\/blografia.net\/lacobachab\/xmlrpc.php\r\nETag: \"c4b42b6a4db055659fba42921b7b9ae8\"\r\nContent-Type: text\/xml; charset=UTF-8<\/pre>\n<p>Notice the change from i to I to not get all the code but header&#8230; yeah, troubleshooting is time consuming but its better than just reinstalling to try to fix something that now I&#8217;m aware its really easy to spot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From last weekend our blog lacobachab where not updating their feed, as I removed and updated wp-cache info, most probably I removed redundant entries on .htaccess, BUT looks like removed the correct ones and left the wrong ones, tip if &hellip; <a href=\"https:\/\/blografia.net\/vicm3\/2013\/06\/legacy-code-everywhere\/\">Sigue leyendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[5,3,10,8,7],"tags":[66,67,63,62,64,505,68,61,65],"class_list":["post-1068","post","type-post","status-publish","format-standard","hentry","category-debraye","category-general","category-planetalinux","category-sysadmin","category-web","tag-blog","tag-debug","tag-feed","tag-php","tag-rss","tag-sysadmin","tag-troubleshoting","tag-wordpress","tag-work"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":57,"url":"https:\/\/blografia.net\/vicm3\/2005\/02\/on_php_flags\/","url_meta":{"origin":1068,"position":0},"title":"On php flags","author":"vicm3","date":"15 febrero, 2005","format":false,"excerpt":"Well as this post was originally on english and i have two powerful reasons to no translate is lefted as in the original... apologies to the spanish readers: Posted: Mon Feb 14, 2005 1:48 pm Before i have complained about had to use register_globals & magic_quotes... as for we host\u2026","rel":"","context":"En \u00abGeneral\u00bb","block_context":{"text":"General","link":"https:\/\/blografia.net\/vicm3\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1378,"url":"https:\/\/blografia.net\/vicm3\/2014\/09\/wordpress-xmlrpc-ddos-mitigation\/","url_meta":{"origin":1068,"position":1},"title":"WordPress xmlrpc DDOS mitigation","author":"vicm3","date":"27 septiembre, 2014","format":false,"excerpt":"Well not long ago DH contacted me with this dreaded message: Hello, I'm writing you about your domain: foo.bar Specifically the file: xmlrpc.php This file is used for modifying your wordpress install from 3rd party\u00a0programs, like mobile site designers, desktop client programs, and pretty\u00a0much anything besides the wordpress control panel\u2026","rel":"","context":"En \u00abplanetalinux\u00bb","block_context":{"text":"planetalinux","link":"https:\/\/blografia.net\/vicm3\/category\/planetalinux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1407,"url":"https:\/\/blografia.net\/vicm3\/2014\/12\/two-things-are-infinite-the-universe-and-human-stupidity\/","url_meta":{"origin":1068,"position":2},"title":"Two things are infinite: the universe and human stupidity","author":"vicm3","date":"10 diciembre, 2014","format":false,"excerpt":"I think that reality is better than fiction, so take this as a fiction story... well short of... The full quote that gives nave to this post it's \"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.\" Albert Einstein. Monday lost five hours\u2026","rel":"","context":"En \u00abDebraye\u00bb","block_context":{"text":"Debraye","link":"https:\/\/blografia.net\/vicm3\/category\/debraye\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1537,"url":"https:\/\/blografia.net\/vicm3\/2016\/01\/bits-of-code-php-and-self-signed-cert-on-moodle\/","url_meta":{"origin":1068,"position":3},"title":"Bits of code, php and self signed cert on Moodle","author":"vicm3","date":"22 enero, 2016","format":false,"excerpt":"And a hack, if you happen to have a Moodle 2.6.x with phpmailer old library and you had php5.6.x you may find if you use ssl\/tls to send mail that now php is strictier with self signed certificates, well there are good documentation on php.net about [1] and [2] but\u2026","rel":"","context":"En \u00abEducaci\u00f3n\u00bb","block_context":{"text":"Educaci\u00f3n","link":"https:\/\/blografia.net\/vicm3\/category\/educacion\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1691,"url":"https:\/\/blografia.net\/vicm3\/2016\/11\/automagic-moodle-update\/","url_meta":{"origin":1068,"position":4},"title":"Automagic Moodle update","author":"vicm3","date":"14 noviembre, 2016","format":false,"excerpt":"Well its monday so semi auto magic roll of patches on CentOS via yum-cron on Debian broken for some dumb and strong firewall rules but applied via unattended updates now done through a ssh tunnel using tsocks, been thinking on create a permanent tunnel or one based on apt.conf and\u2026","rel":"","context":"En \u00abDebraye\u00bb","block_context":{"text":"Debraye","link":"https:\/\/blografia.net\/vicm3\/category\/debraye\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":835,"url":"https:\/\/blografia.net\/vicm3\/2011\/11\/un-problema-comun-en-wp\/","url_meta":{"origin":1068,"position":5},"title":"Un problema com\u00fan en WP","author":"vicm3","date":"15 noviembre, 2011","format":false,"excerpt":"Que acabo de descubrir varios scripts automatizados est\u00e1n aprovechando autosave.js que es una funci\u00f3n com\u00fan a las ultimas versiones de WP expone el path en el servidor donde alojamos nuestro blog, esto por si solo no es tan delicado, pero dice bastante de nuestro blog, para empezar que tema usamos\u2026","rel":"","context":"En \u00abDebraye\u00bb","block_context":{"text":"Debraye","link":"https:\/\/blografia.net\/vicm3\/category\/debraye\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/posts\/1068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/comments?post=1068"}],"version-history":[{"count":0,"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/posts\/1068\/revisions"}],"wp:attachment":[{"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/media?parent=1068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/categories?post=1068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/tags?post=1068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}