Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

111
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda