1

How would I setup a custom rewrite rule to redirect /wp-admin/(page-slug).php to /wp-admin/admin.php?page=(page-slug)

1

How would I setup a custom rewrite rule to redirect /wp-admin/(page-slug).php to /wp-admin/admin.php?page=(page-slug)

You can't, WP Admin doesn't make use of the rewrite rules system like the frontend, so rewrite rules have no effect on WP Admin pages.

You can only use WP rewrite rules to map pretty URLs on to versions that take the form index.php?var=val where the var URL parameters are query parameters for the main WP_Query, where index.php is the frontend entry point

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy