Let's say I have an AJAX callback setup using admin-ajax.php that fetches WordPress posts when query parameters are passed in the URL. A typical URL for an AJAX call using the GET method would look like:
Now I would like to rewrite this to something like:
I'm able to rewrite URL for pages using WordPress native
generate_rewrite_rules hook. But that doesn't work for admin-ajax.php as Wordress hasn't even loaded when admin-ajax.php is called. Any ideas on how to get this setup?