解决Piwigo的Guestbook跳转失败的问题
不知道什么时候起,画廊的Guestbook就不能访问了。
开始还以为是插件的问题,反复关闭启用,甚至重新安装了也没有用。
后来才发现跳转的时候,地址栏自动被加入了80端口,搜索了一下发现了以下文章:
https://github.com/Piwigo/Piwigo/issues/681
按照文章中的方法,解决了问题。

diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php
index ea329b4..c144ee1 100644
--- a/include/functions_url.inc.php
+++ b/include/functions_url.inc.php
@@ -69,15 +69,6 @@ function get_absolute_root_url($with_scheme=true)
else
{
$url .= $_SERVER['HTTP_HOST'];
- if ( (!$is_https && $_SERVER['SERVER_PORT'] != 80)
- ||($is_https && $_SERVER['SERVER_PORT'] != 443))
- {
- $url_port = ':'.$_SERVER['SERVER_PORT'];
- if (strrchr($url, ':') != $url_port)
- {
- $url .= $url_port;
- }
- }
}
}
$url .= cookie_path();
评论共 0 条
不想用 GitHub 账号?也可以发邮件给我。