Apache does not know. All requests are sent to index.php , and Wordpress saves the internal log on which the page is redirected and redirects it. So, essentially, Wordpress has two sets of rewrite rules: one inside and a βgreedyβ external rule in your .htaccess, which basically makes all requests a reference to internal rewrite rules.
You may be interested in using this plugin , which shows all the internal rewrites that Wordpress itself does.
source share