Hi,
I think the behavior you describing in the thread is due to applying this policy: Redirect sites from IE to Microsoft Edge. It's controlled by group policy not code. So you can't add some code in your website to achieve this. I suggest you can add a warning page about not supporting IE in your website if you want to redirect your users to other browsers.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Regards,
Yu Zhou