I had already tried this resolution. But, the existing pages now give me a “This page cannot be found” error.
When initially setting up this WordPress site a couple days ago, I changed permalinks from the default to using the post name structure. Then, I notice it was adding index.php to the url and tried using the custom structure (same way you mentioned above). But, that broke the links to the pages.