{"id":20,"date":"2013-11-04T23:14:10","date_gmt":"2013-11-04T23:20:46","guid":{"rendered":"https:\/\/43575website_cpanel_pretty_link_redirection.jpg"},"modified":"2015-07-16T18:18:50","modified_gmt":"2015-07-17T00:18:50","slug":"redirigir-a-otro-sitio-con-php-con-header-location","status":"publish","type":"post","link":"https:\/\/emanuelpaxtian.com\/blog\/redirigir-a-otro-sitio-con-php-con-header-location\/","title":{"rendered":"Redirigir a otro sitio con php con Header Location"},"content":{"rendered":"<p>La funci\u00f3n header tiene varias funciones, pero lo que hoy nos interesa es el poder redireccionar a otro destino, un uso es por ejemplo las web de acortamiento de URL, reciben la URL acortada (<a class=\"bitmark-shortlink\" href=\"http:\/\/bit.ly\/HGs5qF\"><span class=\"protocol\">http:\/\/<\/span>bit.ly\/HGs5qF<\/a>) y luego lo redireccionan a la URL a la que hace referencia.<\/p>\n<p>Sin mas manos a la obra<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">header(&quot;Location: http:\/\/www.psoluciones.net\/m&quot;); \/* Redirecci\u00f3n del navegador *\/\r\n\r\n\/* Asegur\u00e1ndonos de que el c\u00f3digo interior no ser\u00e1 ejecutado cuando se realiza la redirecci\u00f3n. *\/\r\nexit;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>La funci\u00f3n header tiene varias funciones, pero lo que hoy nos interesa es el poder redireccionar a otro destino, un uso es por ejemplo las web de acortamiento de URL,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":543,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-20","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/emanuelpaxtian.com\/blog\/wp-json\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emanuelpaxtian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emanuelpaxtian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emanuelpaxtian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/emanuelpaxtian.com\/blog\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":0,"href":"https:\/\/emanuelpaxtian.com\/blog\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/emanuelpaxtian.com\/blog\/wp-json\/wp\/v2\/media\/543"}],"wp:attachment":[{"href":"https:\/\/emanuelpaxtian.com\/blog\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emanuelpaxtian.com\/blog\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emanuelpaxtian.com\/blog\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}