TL;DR How to change a paginated URL so it reads "example.com/foo/2/" instead of "example.com/foo/page2/"?
Excuse me if this is the wrong place to post this (in which case please move this to the right forum), or this has been asked before... but how do you remove the "page" prefix in a paginated url so that it reads something like "example.com/foo/1/" instead of the default of "example.com/foo/page1/"?
I know that for any other type of prefix, I can just override $config->pageNumUrlPrefix in site/config.php, but I can't figure out how you'd do it if you simply want an effectively "blank" prefix. I've tried setting $config->pageNumUrlPrefix = '' but that ends up breaking pagination altogether or the page prefix ends up in the URL instead. The only way I can think of doing this is actually changing the line:
if(!$pageNumUrlPrefix) $pageNumUrlPrefix = 'page';
to
if(!$pageNumUrlPrefix) $pageNumUrlPrefix = '';
but tampering a module file seems bad practice and so I am looking for a better way to achieve this. Help a ProcessWire noob out!