Redirect 404 To Homepage - Version 1.1.0

Version Description

  • tested with WP 5.0
  • updated plugin meta
Download this release

Release Info

Developer littlebizzy
Plugin Icon 128x128 Redirect 404 To Homepage
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.12 to 1.1.0

Files changed (4) hide show
  1. 404-to-homepage.php +2 -2
  2. admin-notices-ms.php +1 -1
  3. admin-notices.php +1 -1
  4. readme.txt +37 -111
404-to-homepage.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: 404 To Homepage
4
  Plugin URI: https://www.littlebizzy.com/plugins/404-to-homepage
5
  Description: Redirects all 404 (Not Found) errors to the homepage for a better user experience, less abuse from bots, and 100% elimination of Google GSC warnings.
6
- Version: 1.0.12
7
  Author: LittleBizzy
8
  Author URI: https://www.littlebizzy.com
9
  License: GPLv3
@@ -31,7 +31,7 @@ if (!function_exists('add_action'))
31
  // Plugin constants
32
  define('NTFTHP_FILE', __FILE__);
33
  define('NTFTHP_PATH', dirname(NTFTHP_FILE));
34
- define('NTFTHP_VERSION', '1.0.12');
35
 
36
 
37
  /* 404 hooks */
3
  Plugin Name: 404 To Homepage
4
  Plugin URI: https://www.littlebizzy.com/plugins/404-to-homepage
5
  Description: Redirects all 404 (Not Found) errors to the homepage for a better user experience, less abuse from bots, and 100% elimination of Google GSC warnings.
6
+ Version: 1.1.0
7
  Author: LittleBizzy
8
  Author URI: https://www.littlebizzy.com
9
  License: GPLv3
31
  // Plugin constants
32
  define('NTFTHP_FILE', __FILE__);
33
  define('NTFTHP_PATH', dirname(NTFTHP_FILE));
34
+ define('NTFTHP_VERSION', '1.1.0');
35
 
36
 
37
  /* 404 hooks */
admin-notices-ms.php CHANGED
@@ -22,7 +22,7 @@ final class Admin_Notices_MS {
22
  * Custom message
23
  * Mark %plugin% reflects the plugin name
24
  */
25
- private $message = 'Sorry! For performance reasons, WordPress Multisite is not supported by <strong>%plugin%</strong>. Achieve top speed and security with a <a href="https://www.littlebizzy.com/hosting?utm_source=multisite" target="_blank">dedicated Nginx VPS</a> for every site.';
26
 
27
 
28
 
22
  * Custom message
23
  * Mark %plugin% reflects the plugin name
24
  */
25
+ private $message = 'For performance reasons, <strong>%plugin%</strong> does not support Multisite. For best results, always place your WordPress website on a <a href="https://www.littlebizzy.com/hosting?utm_source=multisite" target="_blank">dedicated Nginx server</a>.';
26
 
27
 
28
 
admin-notices.php CHANGED
@@ -24,7 +24,7 @@ final class NTFTHP_Admin_Notices {
24
  private $rate_us_url2 = 'https://www.facebook.com/groups/littlebizzy/';
25
  private $rate_us_url3 = 'https://www.littlebizzy.com/services/speed-boost?utm_source=wpnotice';
26
  private $rate_us_url4 = 'https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices#Disable_Nag_Notices';
27
- private $rate_us_message = 'Howdy, friend :)<br><br>Thanks for using <strong>%plugin%</strong>. Please support our free work by rating this plugin with 5 stars on <a href="%url%" target="_blank">WordPress.org</a>.<br><br>You may also join our free <a href="%url2%" target="_blank">Facebook group</a> to post any questions or comments!<br><br>Cheers, Jesse<br><br>P.S. Use coupon code <code>SPEED20</code> to get $20 off our popular <a href="%url3%" target="_blank">Speed Boost</a> service at LittleBizzy.com.<br><br><small><em><a href="%url4%" target="_blank">Hide these notices</a></em></small>';
28
 
29
 
30
 
24
  private $rate_us_url2 = 'https://www.facebook.com/groups/littlebizzy/';
25
  private $rate_us_url3 = 'https://www.littlebizzy.com/services/speed-boost?utm_source=wpnotice';
26
  private $rate_us_url4 = 'https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices#Disable_Nag_Notices';
27
+ private $rate_us_message = 'Thanks for using <strong>%plugin%</strong>. Please support our free work by rating this plugin with 5 stars on <a href="%url%" target="_blank">WordPress.org</a>.<br><br>You may also join our free <a href="%url2%" target="_blank">Facebook group</a> to post any questions or comments!<br><br>Cheers, Jesse<br><br>P.S. Use coupon code <code>SPEED20</code> to get $20 off our popular <a href="%url3%" target="_blank">Speed Boost</a> service at LittleBizzy.com.<br><br><small><em><a href="%url4%" target="_blank">Hide these notices</a></em></small>';
28
 
29
 
30
 
readme.txt CHANGED
@@ -4,10 +4,10 @@ Contributors: littlebizzy
4
  Donate link: https://www.patreon.com/littlebizzy
5
  Tags: 404, errors, redirect, 301, homepage
6
  Requires at least: 4.4
7
- Tested up to: 4.9
8
  Requires PHP: 7.0
9
  Multisite support: No
10
- Stable tag: 1.0.12
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
  Prefix: NTFTHP
@@ -18,14 +18,12 @@ Redirects all 404 (Not Found) errors to the homepage for a better user experienc
18
 
19
  Redirects all 404 (Not Found) errors to the homepage for a better user experience, less abuse from bots, and 100% elimination of Google GSC warnings.
20
 
21
- * [**Join our free Facebook group for support**](https://www.facebook.com/groups/littlebizzy/)
 
22
  * [Plugin Homepage](https://www.littlebizzy.com/plugins/404-to-homepage)
23
  * [Plugin GitHub](https://github.com/littlebizzy/404-to-homepage)
24
- * [SlickStack](https://slickstack.io)
25
- * [WP Lite Boilerplate](https://wplite.org)
26
- * [Starter Theme](https://starter.littlebizzy.com)
27
 
28
- #### The Long Version ####
29
 
30
  404 To Homepage is a simple WordPress plugin for redirecting all 404 "Not Found" errors to the homepage. The reason for doing this is to avoid user confusion (or lost leads), and to avoid abuse causes by bots that ping your site with non-existent URLs which can negatively effect search engine indexing. Additionally, it can totally eliminate the warnings created in Google GSC (Webmasters) in regard to 404 errors that begin piling up over time, which quite often are not even the fault of your website.
31
 
@@ -37,126 +35,51 @@ This is a version that uses the early WP hook 'pre_handle_404' to avoid unnecess
37
 
38
  Before to do the redirection to the homepage, there is a procedure that removes any existing previous header, so only 301 header will be sent in response to the HTTP request. You can see the headers in chrome from Network tab and checking preserve log. For Firefox you can use the Live HTTP headers addon, for example.
39
 
40
- #### Plugin Features ####
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  * Settings Page: No
43
- * Premium Version Available: Yes ([SEO Genius](https://www.littlebizzy.com/plugins/seo-genius))
44
- * Includes Media (Images, Icons, Etc): No
 
45
  * Includes CSS: No
46
  * Database Storage: Yes
47
  * Transients: No
48
- * Options: Yes
 
49
  * Creates New Tables: No
 
50
  * Database Queries: Backend Only (Options API)
51
- * Must-Use Support: Yes (Use With [Autoloader](https://github.com/littlebizzy/autoloader))
52
  * Multisite Support: No
53
  * Uninstalls Data: Yes
54
 
55
- #### WP Admin Notices ####
56
-
57
- This plugin generates multiple [Admin Notices](https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices) in the WP Admin dashboard. The first is a notice that fires during plugin activation which recommends several related free plugins that we believe will enhance this plugin's features; this notice will re-appear approximately once every 6 months as our code and recommendations evolve. The second is a notice that fires a few days after plugin activation which asks for a 5-star rating of this plugin on its WordPress.org profile page. This notice will re-appear approximately once every 9 months. These notices can be dismissed by clicking the **(x)** symbol in the upper right of the notice box. These notices may annoy or confuse certain users, but are appreciated by the majority of our userbase, who understand that these notices support our free contributions to the WordPress community while providing valuable (free) recommendations for optimizing their website.
58
-
59
- If you feel that these notices are too annoying, than we encourage you to consider one or more of our upcoming premium plugins that combine several free plugin features into a single control panel, or even consider developing your own plugins for WordPress, if supporting free plugin authors is too frustrating for you. A final alternative would be to place the defined constant mentioned below inside of your `wp-config.php` file to manually hide this plugin's nag notices:
60
-
61
- define('DISABLE_NAG_NOTICES', true);
62
-
63
- Note: This defined constant will only affect the notices mentioned above, and will not affect any other notices generated by this plugin or other plugins, such as one-time notices that communicate with admin-level users.
64
-
65
- #### Code Inspiration ####
66
-
67
- This plugin was partially inspired either in "code or concept" by the open-source software and discussions mentioned below:
68
-
69
- * [All 404 Redirect to Homepage](https://wordpress.org/plugins/all-404-redirect-to-homepage/)
70
- * [404 Redirection](https://wordpress.org/plugins/404-redirection/)
71
- * [Redirect 404 Error Page to Homepage](https://wordpress.org/plugins/redirect-404-error-page-to-homepage/)
72
-
73
- #### Recommended Plugins ####
74
-
75
- We invite you to check out a few other related free plugins that our team has also produced that you may find especially useful:
76
-
77
-
78
- * [404 To Homepage](https://wordpress.org/plugins/404-to-homepage-littlebizzy/)
79
- * [CloudFlare](https://wordpress.org/plugins/cf-littlebizzy/)
80
- * [Delete Expired Transients](https://wordpress.org/plugins/delete-expired-transients-littlebizzy/)
81
- * [Disable Admin-AJAX](https://wordpress.org/plugins/disable-admin-ajax-littlebizzy/)
82
- * [Disable Author Pages](https://wordpress.org/plugins/disable-author-pages-littlebizzy/)
83
- * [Disable Cart Fragments](https://wordpress.org/plugins/disable-cart-fragments-littlebizzy/)
84
- * [Disable Embeds](https://wordpress.org/plugins/disable-embeds-littlebizzy/)
85
- * [Disable Emojis](https://wordpress.org/plugins/disable-emojis-littlebizzy/)
86
- * [Disable Empty Trash](https://wordpress.org/plugins/disable-empty-trash-littlebizzy/)
87
- * [Disable Image Compression](https://wordpress.org/plugins/disable-image-compression-littlebizzy/)
88
- * [Disable jQuery Migrate](https://wordpress.org/plugins/disable-jq-migrate-littlebizzy/)
89
- * [Disable Search](https://wordpress.org/plugins/disable-search-littlebizzy/)
90
- * [Disable WooCommerce Status](https://wordpress.org/plugins/disable-wc-status-littlebizzy/)
91
- * [Disable WooCommerce Styles](https://wordpress.org/plugins/disable-wc-styles-littlebizzy/)
92
- * [Disable XML-RPC](https://wordpress.org/plugins/disable-xml-rpc-littlebizzy/)
93
- * [Download Media](https://wordpress.org/plugins/download-media-littlebizzy/)
94
- * [Download Plugin](https://wordpress.org/plugins/download-plugin-littlebizzy/)
95
- * [Download Theme](https://wordpress.org/plugins/download-theme-littlebizzy/)
96
- * [Duplicate Post](https://wordpress.org/plugins/duplicate-post-littlebizzy/)
97
- * [Export Database](https://wordpress.org/plugins/export-database-littlebizzy/)
98
- * [Force HTTPS](https://wordpress.org/plugins/force-https-littlebizzy/)
99
- * [Force Strong Hashing](https://wordpress.org/plugins/force-strong-hashing-littlebizzy/)
100
- * [Google Analytics](https://wordpress.org/plugins/ga-littlebizzy/)
101
- * [Header Cleanup](https://wordpress.org/plugins/header-cleanup-littlebizzy/)
102
- * [Index Autoload](https://wordpress.org/plugins/index-autoload-littlebizzy/)
103
- * [Maintenance Mode](https://wordpress.org/plugins/maintenance-mode-littlebizzy/)
104
- * [Profile Change Alerts](https://wordpress.org/plugins/profile-change-alerts-littlebizzy/)
105
- * [Remove Category Base](https://wordpress.org/plugins/remove-category-base-littlebizzy/)
106
- * [Remove Query Strings](https://wordpress.org/plugins/remove-query-strings-littlebizzy/)
107
- * [Server Status](https://wordpress.org/plugins/server-status-littlebizzy/)
108
- * [StatCounter](https://wordpress.org/plugins/sc-littlebizzy/)
109
- * [View Defined Constants](https://wordpress.org/plugins/view-defined-constants-littlebizzy/)
110
- * [Virtual Robots.txt](https://wordpress.org/plugins/virtual-robotstxt-littlebizzy/)
111
-
112
- #### Premium Plugins ####
113
-
114
- We invite you to check out a few premium plugins that our team has also produced that you may find especially useful:
115
-
116
- * [Speed Demon](https://www.littlebizzy.com/plugins/speed-demon)
117
- * [SEO Genius](https://www.littlebizzy.com/plugins/seo-genius)
118
- * [Great Migration](https://www.littlebizzy.com/plugins/great-migration)
119
- * [Security Guard](https://www.littlebizzy.com/plugins/security-guard)
120
- * [Genghis Khan](https://www.littlebizzy.com/plugins/genghis-khan)
121
-
122
- #### Special Thanks ####
123
-
124
- We thank the following groups for their generous contributions to the WordPress community which have particularly benefited us in developing our own free plugins and paid services:
125
-
126
- * [Automattic](https://automattic.com)
127
- * [Brad Touesnard](https://bradt.ca)
128
- * [Daniel Auener](http://www.danielauener.com)
129
- * [Delicious Brains](https://deliciousbrains.com)
130
- * [Greg Rickaby](https://gregrickaby.com)
131
- * [Matt Mullenweg](https://ma.tt)
132
- * [Mika Epstein](https://halfelf.org)
133
- * [Mike Garrett](https://mikengarrett.com)
134
- * [Samuel Wood](http://ottopress.com)
135
- * [Scott Reilly](http://coffee2code.com)
136
- * [Jan Dembowski](https://profiles.wordpress.org/jdembowski)
137
- * [Jeff Starr](https://perishablepress.com)
138
- * [Jeff Chandler](https://jeffc.me)
139
- * [Jeff Matson](https://jeffmatson.net)
140
- * [John James Jacoby](https://jjj.blog)
141
- * [Leland Fiegel](https://leland.me)
142
- * [Rahul Bansal](https://profiles.wordpress.org/rahul286)
143
- * [Roots](https://roots.io)
144
- * [rtCamp](https://rtcamp.com)
145
- * [Ryan Hellyer](https://geek.hellyer.kiwi)
146
- * [WP Chat](https://wpchat.com)
147
- * [WP Tavern](https://wptavern.com)
148
-
149
  #### Disclaimer ####
150
 
151
- We released this plugin in response to our managed hosting clients asking for better access to their server, and our primary goal will remain supporting that purpose. Although we are 100% open to fielding requests from the WordPress community, we kindly ask that you keep the above mentioned goals in mind, thanks!
152
 
153
  == Installation ==
154
 
155
  1. Upload to `/wp-content/plugins/404-to-homepage-littlebizzy`
156
  2. Activate via WP Admin > Plugins
157
- 3. Test the plugin is working by loading a non-existent page URI on your website
158
 
159
- == FAQ ==
 
 
160
 
161
  = Does this plugin alter my 404.php template? =
162
 
@@ -176,6 +99,10 @@ Please avoid leaving negative reviews in order to get a feature implemented. Ins
176
 
177
  == Changelog ==
178
 
 
 
 
 
179
  = 1.0.12 =
180
  * updated recommended plugins
181
 
@@ -201,7 +128,7 @@ Please avoid leaving negative reviews in order to get a feature implemented. Ins
201
  * updated recommended plugins
202
 
203
  = 1.0.6 =
204
- * added filter to "skip" WP Admin, WP Cron, and XML-RPC requests
205
  * updated recommended plugins
206
 
207
  = 1.0.5 =
@@ -222,4 +149,3 @@ Please avoid leaving negative reviews in order to get a feature implemented. Ins
222
 
223
  = 1.0.0 =
224
  * initial release
225
- * tested with PHP 7.0
4
  Donate link: https://www.patreon.com/littlebizzy
5
  Tags: 404, errors, redirect, 301, homepage
6
  Requires at least: 4.4
7
+ Tested up to: 5.0
8
  Requires PHP: 7.0
9
  Multisite support: No
10
+ Stable tag: 1.1.0
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
  Prefix: NTFTHP
18
 
19
  Redirects all 404 (Not Found) errors to the homepage for a better user experience, less abuse from bots, and 100% elimination of Google GSC warnings.
20
 
21
+ * [**Join our FREE Facebook group for support**](https://www.facebook.com/groups/littlebizzy/)
22
+ * [**Worth a 5-star review? Thank you!**](https://wordpress.org/support/plugin/404-to-homepage-littlebizzy/reviews/?rate=5#new-post)
23
  * [Plugin Homepage](https://www.littlebizzy.com/plugins/404-to-homepage)
24
  * [Plugin GitHub](https://github.com/littlebizzy/404-to-homepage)
 
 
 
25
 
26
+ #### Current Features ####
27
 
28
  404 To Homepage is a simple WordPress plugin for redirecting all 404 "Not Found" errors to the homepage. The reason for doing this is to avoid user confusion (or lost leads), and to avoid abuse causes by bots that ping your site with non-existent URLs which can negatively effect search engine indexing. Additionally, it can totally eliminate the warnings created in Google GSC (Webmasters) in regard to 404 errors that begin piling up over time, which quite often are not even the fault of your website.
29
 
35
 
36
  Before to do the redirection to the homepage, there is a procedure that removes any existing previous header, so only 301 header will be sent in response to the HTTP request. You can see the headers in chrome from Network tab and checking preserve log. For Firefox you can use the Live HTTP headers addon, for example.
37
 
38
+ #### Compatibility ####
39
 
40
+ This plugin has been designed for use on [SlickStack](https://slickstack.io) web servers with PHP 7.2 and MySQL 5.7 to achieve best performance. All of our plugins are meant for single site WordPress installations only; for both performance and usability reasons, we highly recommend avoiding WordPress Multisite for the vast majority of projects.
41
+
42
+ Any of our WordPress plugins may also be loaded as "Must-Use" plugins by using our free [Autoloader](https://github.com/littlebizzy/autoloader) script in the `mu-plugins` directory.
43
+
44
+ #### Defined Constants ####
45
+
46
+ /* Plugin Meta */
47
+ define('DISABLE_NAG_NOTICES', true);
48
+
49
+ #### Technical Details ####
50
+
51
+ * Prefix: NTFTHP
52
+ * Parent Plugin: [**SEO Genius**](https://www.littlebizzy.com/plugins/seo-genius)
53
+ * Disable Nag Notices: [Yes](https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices#Disable_Nag_Notices)
54
  * Settings Page: No
55
+ * PHP Namespaces: No
56
+ * Object-Oriented Code: No
57
+ * Includes Media (images, icons, etc): No
58
  * Includes CSS: No
59
  * Database Storage: Yes
60
  * Transients: No
61
+ * WP Options Table: Yes
62
+ * Other Tables: No
63
  * Creates New Tables: No
64
+ * Creates New WP Cron Jobs: No
65
  * Database Queries: Backend Only (Options API)
66
+ * Must-Use Support: [Yes](https://github.com/littlebizzy/autoloader)
67
  * Multisite Support: No
68
  * Uninstalls Data: Yes
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  #### Disclaimer ####
71
 
72
+ We released this plugin in response to our managed hosting clients asking for better access to their server, and our primary goal will remain supporting that purpose. Although we are 100% open to fielding requests from the WordPress community, we kindly ask that you keep these conditions in mind, and refrain from slandering, threatening, or harassing our team members in order to get a feature added, or to otherwise get "free" support. The only place you should be contacting us is in our free [**Facebook group**](https://www.facebook.com/groups/littlebizzy/) which has been setup for this purpose, or via GitHub if you are an experienced developer. Thank you!
73
 
74
  == Installation ==
75
 
76
  1. Upload to `/wp-content/plugins/404-to-homepage-littlebizzy`
77
  2. Activate via WP Admin > Plugins
78
+ 3. Test the plugin is working:
79
 
80
+ After plugin activation, purge all caches. Then, try loading a non-existent page (URL) of your site and it should be immediately 301 redirected to the homepage automatically. You can also use HTTP header testing tools to see this happen technically.
81
+
82
+ == Frequently Asked Questions ==
83
 
84
  = Does this plugin alter my 404.php template? =
85
 
99
 
100
  == Changelog ==
101
 
102
+ = 1.1.0 =
103
+ * tested with WP 5.0
104
+ * updated plugin meta
105
+
106
  = 1.0.12 =
107
  * updated recommended plugins
108
 
128
  * updated recommended plugins
129
 
130
  = 1.0.6 =
131
+ * added filter to "skip" `WP Admin`, `WP Cron`, and `XML-RPC` context requests
132
  * updated recommended plugins
133
 
134
  = 1.0.5 =
149
 
150
  = 1.0.0 =
151
  * initial release