Linux 软件免费装

4zero4

开发者 DevFabio
更新时间 2026年6月4日 16:24
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

redirect 404 search error page

下载

1.2

详情介绍:

4zero4 makes your 404 pages useful. When a visitor reaches a URL that no longer exists, the plugin builds a search query from the requested address and redirects the visitor to your site's search results, so they land on relevant content instead of an empty error page. For example, a request for /my-old-product-name/ that no longer resolves is turned into a search for "my old product name". Key points: Developer hooks The behaviour can be customised with filters:

安装:

  1. Upload the 4zero4 folder to /wp-content/plugins/, or install the plugin from the Plugins screen in WordPress.
  2. Activate the plugin through the "Plugins" menu in WordPress.
  3. That's it — there are no settings. Any 404 will now redirect to a matching site search.

升级注意事项:

1.2 Recommended security and reliability update: safe input handling, temporary (302) redirects via wp_safe_redirect(), and new developer filters.

常见问题:

Does the plugin have a settings page?

No. It works out of the box with no configuration.

Why am I redirected with a 302 and not a 301?

A 404 is, by definition, temporary: the page might be restored later. A permanent 301 redirect would be cached by browsers and search engines and would be hard to undo. You can change the status code with the p4zero4_redirect_status filter.

Can I customise the search terms or the destination?

Yes. Use the p4zero4_search_terms, p4zero4_redirect_url and p4zero4_redirect_status filters described in the Description.

Does the plugin send any data to external services?

No. It performs a local redirect on your own site and contacts no third party.

更新日志:

1.2 1.1