{"id":515,"date":"2015-06-11T09:55:27","date_gmt":"2015-06-11T07:55:27","guid":{"rendered":"http:\/\/www.antynet.pl\/?p=515"},"modified":"2015-06-11T09:55:27","modified_gmt":"2015-06-11T07:55:27","slug":"redirect-bez-mod_security-php","status":"publish","type":"post","link":"https:\/\/www.antynet.pl\/index.php\/2015\/06\/11\/redirect-bez-mod_security-php\/","title":{"rendered":"Redirect bez mod_security &#8211; PHP"},"content":{"rendered":"<div id=\"_mcePaste\" style=\"position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;\">if ($_SERVER[&#8217;HTTP_HOST&#8217;] == 'poczta.debacom.pl&#8217; ||<\/div>\n<div id=\"_mcePaste\" style=\"position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;\">$_SERVER[&#8217;HTTP_HOST&#8217;] == 'mail.debacom.pl&#8217;) {<\/div>\n<div id=\"_mcePaste\" style=\"position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;\">&lt;&#8212;&#8212;&gt;header(&#8222;Location: http:\/\/debacom.pl\/mail\/&#8221;);<\/div>\n<div id=\"_mcePaste\" style=\"position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;\">}<\/div>\n<p>Czasem redirecta \u0142atwiej wykona\u0107 w PHP jak innymi metodami,<\/p>\n<p>oto prosty przyk\u0142ad.<\/p>\n<p>if ($_SERVER[&#8217;HTTP_HOST&#8217;] == 'adres1.pl&#8217; ||<\/p>\n<p>$_SERVER[&#8217;HTTP_HOST&#8217;] == 'adres2.pl&#8217;) {<\/p>\n<p>header(&#8222;Location: http:\/\/poprawnadomena.pl&#8221;);<\/p>\n<p>}<\/p>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>if ($_SERVER[&#8217;HTTP_HOST&#8217;] == 'poczta.debacom.pl&#8217; || $_SERVER[&#8217;HTTP_HOST&#8217;] == 'mail.debacom.pl&#8217;) { &lt;&#8212;&#8212;&gt;header(&#8222;Location: http:\/\/debacom.pl\/mail\/&#8221;); } Czasem redirecta \u0142atwiej wykona\u0107 w PHP jak innymi metodami, oto prosty przyk\u0142ad. if ($_SERVER[&#8217;HTTP_HOST&#8217;] == 'adres1.pl&#8217; || $_SERVER[&#8217;HTTP_HOST&#8217;] == 'adres2.pl&#8217;) { header(&#8222;Location: http:\/\/poprawnadomena.pl&#8221;); }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-515","post","type-post","status-publish","format-standard","hentry","category-sciaga-admina"],"_links":{"self":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/comments?post=515"}],"version-history":[{"count":1,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/515\/revisions"}],"predecessor-version":[{"id":516,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/515\/revisions\/516"}],"wp:attachment":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/media?parent=515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/categories?post=515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/tags?post=515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}