{"id":99042,"date":"2019-03-07T11:11:53","date_gmt":"2019-03-07T11:11:53","guid":{"rendered":"https:\/\/it.wordpress.org\/plugins\/4zero4\/"},"modified":"2026-06-04T08:24:33","modified_gmt":"2026-06-04T08:24:33","slug":"4zero4","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/4zero4\/","author":14536151,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2","stable_tag":"1.2","tested":"7.0","requires":"6.5","requires_php":"7.4","requires_plugins":null,"header_name":"4zero4","header_author":"DevFabio","header_description":"Gestione pagina non trovata, effettua una ricerca cercando termini relativi alla pagina assente","assets_banners_color":"","last_updated":"2026-06-04 08:24:33","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/4zero4\/","header_author_uri":"https:\/\/profiles.wordpress.org\/devfabio\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1869,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.2":{"tag":"1.2","author":"DevFabio","date":"2026-06-04 08:24:33"}},"upgrade_notice":{"1.2":"<p>Recommended security and reliability update: safe input handling, temporary (302)\nredirects via wp_safe_redirect(), and new developer filters.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[905,970,727,944],"plugin_category":[],"plugin_contributors":[165218],"plugin_business_model":[],"class_list":["post-99042","plugin","type-plugin","status-publish","hentry","plugin_tags-905","plugin_tags-error-page","plugin_tags-redirect","plugin_tags-search","plugin_contributors-devfabio","plugin_committers-devfabio"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/4zero4.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>4zero4 makes your 404 pages useful. When a visitor reaches a URL that no longer\nexists, the plugin builds a search query from the requested address and redirects\nthe visitor to your site's search results, so they land on relevant content\ninstead of an empty error page.<\/p>\n\n<p>For example, a request for <code>\/my-old-product-name\/<\/code> that no longer resolves is\nturned into a search for \"my old product name\".<\/p>\n\n<p>Key points:<\/p>\n\n<ul>\n<li><strong>Zero configuration.<\/strong> Activate it and it works.<\/li>\n<li><strong>Temporary redirect (302).<\/strong> The original URL may become valid again, so the\nredirect is never cached as permanently moved.<\/li>\n<li><strong>Front-end only.<\/strong> It never interferes with the admin area, feeds or the REST\nAPI, and only acts on normal GET page views.<\/li>\n<li><strong>No external services.<\/strong> The plugin does not send any data anywhere and does\nnot use tracking or analytics.<\/li>\n<\/ul>\n\n<h4>Developer hooks<\/h4>\n\n<p>The behaviour can be customised with filters:<\/p>\n\n<ul>\n<li><code>p4zero4_search_terms<\/code> \u2014 change (or clear, to skip) the terms extracted from the URL.<\/li>\n<li><code>p4zero4_redirect_url<\/code> \u2014 change (or clear, to cancel) the destination URL.<\/li>\n<li><code>p4zero4_redirect_status<\/code> \u2014 change the HTTP status code (default <code>302<\/code>).<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>4zero4<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install the plugin\nfrom the Plugins screen in WordPress.<\/li>\n<li>Activate the plugin through the \"Plugins\" menu in WordPress.<\/li>\n<li>That's it \u2014 there are no settings. Any 404 will now redirect to a matching\nsite search.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20the%20plugin%20have%20a%20settings%20page%3F\"><h3>Does the plugin have a settings page?<\/h3><\/dt>\n<dd><p>No. It works out of the box with no configuration.<\/p><\/dd>\n<dt id=\"why%20am%20i%20redirected%20with%20a%20302%20and%20not%20a%20301%3F\"><h3>Why am I redirected with a 302 and not a 301?<\/h3><\/dt>\n<dd><p>A 404 is, by definition, temporary: the page might be restored later. A permanent\n301 redirect would be cached by browsers and search engines and would be hard to\nundo. You can change the status code with the <code>p4zero4_redirect_status<\/code> filter.<\/p><\/dd>\n<dt id=\"can%20i%20customise%20the%20search%20terms%20or%20the%20destination%3F\"><h3>Can I customise the search terms or the destination?<\/h3><\/dt>\n<dd><p>Yes. Use the <code>p4zero4_search_terms<\/code>, <code>p4zero4_redirect_url<\/code> and\n    p4zero4_redirect_status filters described in the Description.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20send%20any%20data%20to%20external%20services%3F\"><h3>Does the plugin send any data to external services?<\/h3><\/dt>\n<dd><p>No. It performs a local redirect on your own site and contacts no third party.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2<\/h4>\n\n<ul>\n<li>Security: the requested URL is now read, unslashed and sanitised safely instead\nof using a raw server variable.<\/li>\n<li>Redirects now use <code>wp_safe_redirect()<\/code> with a temporary 302 status instead of a\nraw permanent 301 header.<\/li>\n<li>Switched to the <code>template_redirect<\/code> hook and added guards for admin, feeds, REST\nand non-GET requests.<\/li>\n<li>Added a guard against direct file access (ABSPATH check).<\/li>\n<li>Added the <code>p4zero4_search_terms<\/code>, <code>p4zero4_redirect_url<\/code> and\n  p4zero4_redirect_status filters.<\/li>\n<li>Completed the plugin header (License, Text Domain, Requires at least, Requires PHP).<\/li>\n<li>Rewrote the readme in English with full sections; fixed the Stable tag to match\nthe plugin version.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Previous public release.<\/li>\n<\/ul>","raw_excerpt":"Turn &quot;page not found&quot; (404) errors into a helpful search instead of a dead end.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/99042","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=99042"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/devfabio"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=99042"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=99042"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=99042"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=99042"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=99042"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=99042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}