{"id":509,"date":"2019-03-27T19:24:41","date_gmt":"2019-03-28T01:24:41","guid":{"rendered":"http:\/\/veracitek.com\/blog\/?p=509"},"modified":"2021-03-02T20:25:01","modified_gmt":"2021-03-03T03:25:01","slug":"file_get_contentsphp-input-blank-empty-nada-zilch-kaput-null-wheres-my-data","status":"publish","type":"post","link":"http:\/\/veracitek.com\/blog\/2019\/03\/file_get_contentsphp-input-blank-empty-nada-zilch-kaput-null-wheres-my-data\/","title":{"rendered":"file_get_contents(&#8216;php:\/\/input&#8217;) blank, empty, nada, zilch, kaput, null, where&#8217;s my data?"},"content":{"rendered":"\n<p>If you&#8217;re pulling out your hair about why you can&#8217;t process posted payload data to your php script you may be getting 301 redirected by Apache even though you didn&#8217;t ask it to. Try this in your .htaccess:<br><br>DirectorySlash Off<br> RewriteRule ^(nameOfDirectoryYoureTryingToGet|another|another)$ $1\/index.php<br><br>The first line stops the redirect, but, depending on your host, you may find it just causes a &#8220;forbidden&#8221; error, so the second line rewrites you down to the index within the folder. This is useful for API endpoints.<br><br>Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re pulling out your hair about why you can&#8217;t process posted payload data to your php script you may be getting 301 redirected by Apache even though you didn&#8217;t ask it to. Try this in your .htaccess: DirectorySlash Off RewriteRule ^(nameOfDirectoryYoureTryingToGet|another|another)$ $1\/index.php The first line stops the redirect, but, depending on your host, you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"twitterCardType":"","cardImageID":0,"cardImage":"","cardTitle":"","cardDesc":"","cardImageAlt":"","cardPlayer":"","cardPlayerWidth":0,"cardPlayerHeight":0,"cardPlayerStream":"","cardPlayerCodec":"","footnotes":""},"categories":[1],"tags":[356,357,354,355],"class_list":["post-509","post","type-post","status-publish","format-standard","hentry","category-technology","tag-directoryslash","tag-empty","tag-file_get_contents","tag-php-input"],"_links":{"self":[{"href":"http:\/\/veracitek.com\/blog\/wp-json\/wp\/v2\/posts\/509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/veracitek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/veracitek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/veracitek.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/veracitek.com\/blog\/wp-json\/wp\/v2\/comments?post=509"}],"version-history":[{"count":1,"href":"http:\/\/veracitek.com\/blog\/wp-json\/wp\/v2\/posts\/509\/revisions"}],"predecessor-version":[{"id":510,"href":"http:\/\/veracitek.com\/blog\/wp-json\/wp\/v2\/posts\/509\/revisions\/510"}],"wp:attachment":[{"href":"http:\/\/veracitek.com\/blog\/wp-json\/wp\/v2\/media?parent=509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/veracitek.com\/blog\/wp-json\/wp\/v2\/categories?post=509"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/veracitek.com\/blog\/wp-json\/wp\/v2\/tags?post=509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}