Posts Tagged by joomfish

joomla 的 joomfish 可能会导致url跳转到 81端口

由于某些服务器使用了代理服务器,导致joomfish识别了真实的url,常常是是81端口的。这问题的原因yaozer估计是joomfish的route问题引起的。

初步的解决方法如下:

1, joomla/modules/mod_jflanguageselection/helper.php 的  function _createHRef( $language , $modparams)中

$url = str_replace(‘:81′, ”,$url); //替换joomfish自动生成的url中的 81端口。

return $url;

2, joomla/libraries/joomla/application 中的 function redirect( $url, $msg=”, $msgType=’message’ ) 中添加

$url = str_replace(‘:81′, ”,$url); // 替换 redirect()引起的 增加 81端口的问题。

/*

* If the headers have been sent, then we cannot send an additional location header
* so we will output a javascript redirect statement.
*/
if (headers_sent()) {
echo “<script>document.location.href=’$url’;</script>n”;
} else {
//@ob_end_clean(); // clear output buffer
header( ‘HTTP/1.1 301 Moved Permanently’ );
header( ‘Location: ‘ . $url );
}

分享家:Addthis中国