I have permalinks turned on. When I try to edit an image, it gives me a 404 not found error. I have traced this back to an issue with rewrite rules (probably due to permalinks). It should be loading http://DOMAINNAME/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=349-21274
but I can see it redirect to this url instead (notice .html is missing)
What can I do to leave permalinks on, but force this page to load correctly so I can edit images the correct way?