We are migrating a site to WordPress from another platform. An issue came up with the URLs--some are uppercase, some lowercase. I allowed uppercase using this solution: How can I make Capital letter ( upper-case ) permalinks?
However, I am running into some problems as follows:
Some parent pages must be uppercase, while some are lowercase: site.com/page/other-page vs. site.com/Page/another-page
WordPress does not allow duplicate page slugs, even though they are Uppercase vs. lowercase (since WP goes by the assumption that all slugs and urls will be lowercase). Of course, browsers and Google, unlike WordPress, do treat them as separate urls, resulting in 404s if you mistype the url capitalization or click on a link that has different capitalization.
A possible tack was to make some pages into posts and use a category as a "parent page”. This turned out to be impractical, as the post permalinks must be category/%page_id%-%postname% to comply with Google News requirements and match the old site. Therefore all post slugs must be category/%page_id%-%postname%, which does not match the old site on the particular pages that need the uppercase vs. lowercase scenario—they just need to be /parent-page/%postname%
I would prefer not to do 301 redirects per-page—just too much. I would also prefer that the urls stay the same as the old site as much as possible. Making a whole custom post type just for this situation seems unnecessary. Is it possible to override WordPress’s adding on of -2 to duplicate slugs or else have a 301 redirect to the lowercase version of the parent page slug just on the pages I need? I cannot use the Redirection plugin as it conflicts with other plugins we must use on the site. Are there any other suggestions?