Apache would choose a file to serve based on rewritten URL, but the original URL would be passed to the script.
Kestrel passes the rewritten URL down the pipeline (accessible via HttpContext.Request.Path
).
Is it possible to access original URL from Middleware after it has been rewritten?
Following the direction issued by @Tseng. My test wraps the RewriteMiddleware, but you may want a separate middleware.
Later, my auth filter uses it.