Rewrite rule for admin-ajax.php
There are a few things to sort out here. The first is why your rewrite rule will not work. add_rewrite_rule(‘/api’, ‘/wp-admin/admin-ajax.php’, ‘top’); The WordPress rewrite does not redirect to a page. What does is it parses the path using regular expressions into a WordPress query vars. If you disable pretty URLs in WordPress, you’ll see … Read more