发生下列警报:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$today_rel - Line: 474 - File: inc/functions.php PHP 8.2.18 (Linux)
File Line Function
/inc/functions.php 474 errorHandler->error
/global.php 471 my_date
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 550 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 550 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 811 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 811 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(872) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/global.php(872) : eval()'d code 34 errorHandler->error
/global.php 872 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 937 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 937 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5196 - File: inc/functions.php PHP 8.2.18 (Linux)
File Line Function
/inc/functions.php 5196 errorHandler->error
/global.php 937 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7360 - File: inc/functions.php PHP 8.2.18 (Linux)
File Line Function
/inc/functions.php 7360 errorHandler->error
/inc/functions.php 5216 is_member
/global.php 937 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$bottomlinks_markread - Line: 15 - File: global.php(966) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/global.php(966) : eval()'d code 15 errorHandler->error
/global.php 966 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



助听器论坛
最常见的重定向错误 - 可打印的版本

+- 助听器论坛 (http://jhearing.com/mybb)
+-- 版块: 助听器 (http://jhearing.com/mybb/forumdisplay.php?fid=1)
+--- 版块: 问答区 (http://jhearing.com/mybb/forumdisplay.php?fid=2)
+--- 主题: 最常见的重定向错误 (/showthread.php?tid=1519)



最常见的重定向错误 - seoakter - 07-12-2023

当你在重定向时不注意很多SEO问题时,你可能会遇到位置丢失、扫描预算浪费等情况。在这篇文章中,我汇总了我在路由设置中遇到的最常见问题。

在经历了许多情况(例如创 中东移动数据库 建新页面、迁移过程、子域/子文件夹更改、CMS随着时间的推移而创新)之后,重定向成为网络本质的问题。重定向可以是几个 URL,也可以是数千个 URL 可以接受这些重定向过程。Wordpress、Shopify 或其他 CMS 中也可能有适用于它们的插件。 


[图: 88888-300x164.png]


您可以在下面看到副标题最常见的问题:

不应始终选择 301 重定向
最常见的重定向当然是 301 重定向,但也许您的页面可能需要其他重定向代码来代替此重定向代码。在这里,您应该真正考虑 URL 所需的重定向代码并相应地调整您的重定向。如果要使用 301 重定向,则可以选择服务器端重定向。



如果您确实认为您的 URL 应该永久重定向,您可以使用 301 重定向。302重定向表示页面被临时重定向。换句话说,“此页面正在暂时重定向;但如果您说此重定向将很快结束,您可以使用此代码应用重定向。

将所有页面重定向到主页
不要将所有 URL 或旧 URL 列表中的大部分页面完全重定向到主页。谷歌的约翰·穆勒(John Mueller)近年来已经指出了这一点,并解释说“将所有内容重定向到主页确实是很糟糕的做法,因为我们正在丢失与旧内容相关的所有信号。 ”

如果您对排名良好的页面应用此操作,您可能会失去流量并阻止搜索引擎完全检测旧数据。

重定向链!(重定向链)
当一个页面暴露于多个重定向时,用户和 Googlebot 都可能会受到额外的重定向。在这种情况下,正确使用每个 URL 最多重定向 1 次。 


您可以使用许多爬虫程序来检测网站上的这些错误。例如,使用Screming Frog,如果您的网站存在这些问题,您可以查看相关问题并在源代码中找到这些 URL 并将其替换为最终 URL: