Problema con producto (Redirects URLs to a framed page)

  • Autor Autor alseif
  • Fecha de inicio Fecha de inicio
A

alseif

Curioso
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
El problema es el siguiente, nose que pasa esta todo bien para ver urls externas dentro del msimo foro y guay. Hasta aqui todo bien, lo malo que despues se confunde o nose que pasa como vereis en el siguiente enlace los enlaces internos los modifica y los hace erroneos: ejemplo.

se añade esto: !477!

Insertar CODE, HTML o PHP:
http://www.imperiowarez.com/foro/[COLOR=red][B]!477![/B][/COLOR]http://www.imperiowarez.com/foro/tutoriales-de-psp/477-tutorial-6-20-tn-hen-prometheus-iso-loader.html#post1884
y deberia ser asi: ext.php?ref=
Insertar CODE, HTML o PHP:
http://www.imperiowarez.com/foro/[B][COLOR=red]ext.php?ref=[/COLOR][/B]http://www.imperiowarez.com/foro/tutoriales-de-psp/477-tutorial-6-20-tn-hen-prometheus-iso-loader.html#post1884
Pienso que se tiene que modificar algo del archivo ext.php . Asi que si por me ayudan, aqui dejo el doc:

PHP:
<?php
//error_reporting(E_ALL & ~E_NOTICE);
error_reporting(0);
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'externalframe');
$phrasegroups = array();
$specialtemplates = array();
$actiontemplates = array();
$globaltemplates = array('urlredirect_page');

// #####################################################################
// INCLUDES
// #####################################################################
require_once('./global.php');

if ($_GET) {
  foreach ($_GET as $key => $value) {
    if ($key=="ref") {
      $firsturl = $value;
    }
    else {
      $secondurl = "&". $key. "=". $value;
    }
  }

  $ref = strip_tags($firsturl. $secondurl);
}

  $homeurl = parse_url($_SERVER['HTTP_HOST']);
  $homeurl = $homeurl[path];
  $desturl = parse_url($ref);


if ($desturl[scheme] == "http" && $desturl[host]) { //only works for http.  All other protocols become direct links


  if ($homeurl == $desturl[host]) { //see if the referal is local or not.  If local, 301 to new location.
    
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: ". $ref );
 
  }
  else { //otherwise, open new window
    eval('print_output("' . fetch_template('urlredirect_page') . '");');
  }

}
else { //if invalid URL, just display it.  May be non-HTTP protocol

  Header( "HTTP/1.1 301 Moved Permanently" );
  Header( "Location: ". $ref );

}
?>


---------- Actualizado a las 23:10 ---------- Original a las 22:54 ----------

encontre la solucion.

El problema es vbseo, el problema se quita de la siguiente forma:

In vBSEO settings, there is one setting called as "Add Thread Titles"

If this is set to anything other than "Do not add thread titles" we will get into the problem of internal URLs not working with the Redirects.
 
Si. Efectivamente el problema lo genera vBseo. Gracias por compartir 🙂
 

Temas similares

Atrás
Arriba