Mod_rewrite: all pages are served as /p/pagename and are tracked as /p

I’ve switched my URL structure to /p/pagename instead of ?page=pagename.
Now all my pages in Matomo are shown as /p.

Is there some way to tell Matomo to ignore the /p and use the end part?

It’s in Movers and Shakers