Somehow CiviCRM is wanting to use the path /CiviCRM (notice the case) instead of all lowercase civicrm. This has been fine until I upgraded to Civi 5.27 and now the civicrm?civiwp implementation results in a 404. I can change the case manually and it will work but the automatically generated URLs use all lowercase.
For example: https://www.domain.org/civicrm?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&reset=1&id=24 == 404 Not Found
https://www.domain.org/CiviCRM/?civiwp=CiviCRM&q=civicrm%2Fevent%2Finfo&reset=1&id=24 == working
This is also breaking images in my Mosaico templates.
If you change the link to /CiviCRM?civiwp=CiviCRM.... it works.
I have verified that the permalink on the page is lowercase as well as the CMS Database Integration in Civi. Has anyone seen this behavior or have any suggestions for how I can correct it?
UPDATE:
Adding the following lines to my htaccess fixes this as a workaround. Still not sure why it is defaulting to CiviCRM instead of civicrm. Hopefully if this is happening to you, you can use this patch.
RewriteCond %{REQUEST_URI} !^/wp-content/
RewriteRule ^(.*)/civicrm(.*)$ /$1/CiviCRM/$2 [R,L]