On iOS the situation has become more complicated, as the redirect can work depending on the app used to open the html file. In my experience, Onedrive and Dropbox work (though onedrive won't let you share the redirected file), but Files, Notes, and Google Drive won't. Alternatively, you can always save the file somewhere (locally on the device or in some cloud provider or network drive) and create a shortcut which follows these instructions for it to open in safari (just as if you had saved it and opened it from Dropbox): https://www.reddit.com/r/shortcuts/comments/p3wm9a/comment/h8v42as/?context=3
Comments on What is the best file format for web shortcuts
Of course, this only applies if you don't upload the file to some webserver that will render it normally, in that case it will redirect just fine.
Sukil