[WordPress] 外掛分享: Permalink Validator

首頁外掛目錄 › Permalink Validator
10+
安裝啟用
尚無評分
6058 天前
最後更新
問題解決
WordPress 2.0.0+ v0.7 上架:2007-06-15

內容簡介

Permalink Validator 是一款針對 IIS 伺服器環境設計的永久連結驗證外掛,透過修正網址格式與強制正確導向,避免重複內容問題,提升 WordPress 網站的 SEO 表現。

【主要功能】
• 自動補齊網址結尾斜線,統一永久連結格式
• 依永久連結結構自動增減 www 前綴
• 無效網址強制顯示正確的 404 頁面
• 修正 IIS 環境下的分頁功能異常
• 支援 HTTPS 網址驗證
• 防止搜尋引擎將多種網址視為重複內容

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.7) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Permalink Validator」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

WordPress 2.3 now includes validation of the permalink URL when using Apache web server,
but if using IIS then this plugin is still relevant.
Permalink Validator helps Search Engine Optimization (SEO) as it prevents duplicate
contents on your WordPress blog:

Adds trailing back-slash if missing (Can also be done with htaccess or isapi_rewrite).
Adds or removes www prefix according to your permalink structure (Can also be done with htaccess or isapi_rewrite).
Forces a correct 404 page instead of showing an empty search result when using an invalid URL
Works only on post, pages and categories. Archives based on date (Daily, Monthly, Yearly) and search-result-pages should use noindex. Feed and trackback pages should be added to the robots.txt.
Fixes pagination for WP on IIS.
Fixes trailing slash for pages and categories on WP 2.2 when not having trailing slash in post permalink structure.

WordPress it very forgiving when supplying an URL that doesn’t match the
actual permalink to a post or a page. This is caused by WordPress using some
very greedy wp_rewrite_rules, which accepts almost any URL as valid.
This means that multiple URLs could be used to reach the page, which search engines
sees a duplicate content and leads to penalty.
For example it will accept the following permalink URL as valid:

http://example.com/post/hello-world/2

Even though the official URL is this:

http://example.com/post/hello-world/

Permalink Validator makes a hook to template_redirect, and then adds some
extra validation of the URL supplied before actually calling the
theme-templates.
Version History
Version 0.8

Fixed PHP Warning: strpos() [function.strpos]: Empty delimiter
Converted the PHP file from UTF8 to ANSI (Removed special BOM character in file beginning)

Version 0.7

Permalink Validator will not perform redirect of POST server request

Version 0.6

Fixed a redirection bug introduced in 0.5 when the front page is a page of posts

Version 0.5

WordPress 2.3 includes permalink validation (canonical urls) when using Apache, so this plugin should now only be used with IIS
Added support for HTTPS urls
Added support for special IIS installations where PATH_INFO and SCRIPT_NAME is the same
Added small hack to exclude pages from validation (One is required to edit the source to use it)
Added detection of the plugin Jerome’s Keywords

Version 0.4

Better guessing of a proper REQUEST_URI
Finds the proper REQUEST_URI when using isapi_rewrite
Finds the proper REQUEST_URI when using IIS Mod-Rewrite
Improved validation as it nows expects a proper REQUEST_URI (Guess Apache is now supported)

Version 0.3

Fixes trailing slash for pages and categories in WP 2.2 when using a post permalink structure without ending slash.

Version 0.2

Added support for static front page.
Added detection of integrated BBPress.
Checks that WordPress has been started before adding hooks

Version 0.1

Fixes REQUEST_URI for WP on IIS, which also fixes pagination.
Handles permalink structure with or without index.php.
Handles default permalink structure using only post-id.

Testing Procedures
For each of the different permalink structures:

Default permalink structure (Using query string)
Permalink structure with index.php
Permalink structure without index.php (Using ISAPI_rewrite)
Permalink structure ending with .html
All the above in a sub-directory

Tries the following pages:

Front page and paged
Static page
Post page
Category page and paged
Front page as static page (WP 2.2+)
Front page as post page (WP 2.2+)

Contributors

Scott Yang for giving me the idea and the example of to how make this plugin.
Gabe Anderson for giving me the initiative to release this plugin.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon