register REST API routes before post and page routes to prevent wrong routing