Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

110
Vistas
Need a way to post a url to facebook than will display html in the preview and then redirect

Need a way to post a url to facebook than will display html in the preview and then redirect to a page. The problem is that I also have a php tag that I need to pass.

Right now I'm using a normal 301 header redirect but then you cant output any html. As a result, the facebook preview of the link/page looks blank. So what I want to do is have some html output for facebook to pick up and display and interrogate what is in $search if there is anything and then redirect based on that.

<?php

$search=urlencode($_GET['search']);

if ( $search == "" )
{
$redirectlink="http://mylink";
}
else
{
$redirectlink="http://mylink$search";
}

header("Location: $redirectlink", true, 301);
exit;
?>     
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda