Suggestion: Don't load a 404 template for /wp-admin/
-
Hi Remy,
nice plugin idea!
In my opinion it’s a better idea to force a 404 right in your .htaccess file by:
<ifModule mod_alias.c> RedirectMatch 404 wp\-login\.php </ifModule>
I tried also mod_rewrite, but strange enough you get a WP 404 page.
In your plugin is a function that shows (if available) the 404 template. Why is this necessary? I suggest to remove that part:
if ( is_admin() && ! is_user_logged_in() && ! defined( 'DOING_AJAX' ) && $pagenow !== 'admin-post.php' ) { status_header(404); nocache_headers(); /*if ( get_404_template() ) { include( get_404_template() ); }*/ exit; }
Makes sense?
Thanks
Olaf
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Suggestion: Don't load a 404 template for /wp-admin/’ is closed to new replies.