| 开发者 | DevFabio |
|---|---|
| 更新时间 | 2026年6月4日 16:24 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/my-old-product-name/ that no longer resolves is
turned into a search for "my old product name".
Key points:
p4zero4_search_terms — change (or clear, to skip) the terms extracted from the URL.p4zero4_redirect_url — change (or clear, to cancel) the destination URL.p4zero4_redirect_status — change the HTTP status code (default 302).4zero4 folder to /wp-content/plugins/, or install the plugin
from the Plugins screen in WordPress.No. It works out of the box with no configuration.
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.
Yes. Use the p4zero4_search_terms, p4zero4_redirect_url and
p4zero4_redirect_status filters described in the Description.
No. It performs a local redirect on your own site and contacts no third party.
wp_safe_redirect() with a temporary 302 status instead of a
raw permanent 301 header.template_redirect hook and added guards for admin, feeds, REST
and non-GET requests.p4zero4_search_terms, p4zero4_redirect_url and
p4zero4_redirect_status filters.