這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Disable URL Autocorrect Guessing

外掛說明

This plugin disables WordPress’ URL autocorrection guessing feature.
If you for example enter the URL http://www.myblog.com/proj you won’t be redirected
to http://www.myblog.com/project-2013 anymore.

This plugin is based on the example here: https://core.trac.wordpress.org/ticket/16557

安裝方式

  1. Upload disable-url-autocorrect-guessing.php to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

使用者評論

2020 年 7 月 16 日
This is a must have. WP guesses the most wild things without it. I found thousands of random urls on google, none exists. This plugin makes them 404. like they always should. A new hook will be added in 5.5 add_filter( 'do_redirect_guess_404_permalink', '__return_false' ); https://make.wordpress.org/core/2020/06/26/wordpress-5-5-better-fine-grained-control-of-redirect_guess_404_permalink/ Until then. Must have!
2017 年 10 月 19 日
It’s pretty horrible that wordpress auto-guesses a url because it will break pagination when category pages are auto-guessed and that leads to lots of internal 404s by webmasters. I got this plugin working and it solved all my problems. Just make sure you purge any cdn and cache. I think it also might conflict with some Drupal to Wordpress migration plugins, so you'll have to disable those eventually.
2017 年 3 月 29 日
It's not really needed because the code can just be put in functions.php, but this does make it easier for people who don't know anything about PHP.
閱讀全部 10 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Disable URL Autocorrect Guessing〉的開發相關工作。

參與者

Disable URL Autocorrect Guessing 外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Disable URL Autocorrect Guessing〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

2.0

Since ticket https://core.trac.wordpress.org/ticket/16557 is solved now, the implementation
was changed to use the filter do_redirect_guess_404_permalink as provided in the example here:
https://make.wordpress.org/core/2020/06/26/wordpress-5-5-better-fine-grained-control-of-redirect_guess_404_permalink/

1.1

Added check for $_GET['p'] to allow rel=shortlink according to comment of user esemlabel:
https://core.trac.wordpress.org/ticket/16557#comment:28

1.0

First (and possibly last) version.