That would only direct requests to literally https://domain1.edu to https://domain2.edu . That should work as far as it goes if:
- we are configured to serve domain1 on the site you deploy _redirects on.
- there is a valid SSL certificate for domain1 on the site you deploy _redirects on.
- you never expect visitors to use a URL like https://domain1.edu/somepage since that redirect ONLY handles the bare URL.
Would be useful to get a reference to your real site to examine the setup, but at least, you’ll want to use something like this instead:
https://domain1.edu/* https://domain2.edu/:splat 301!
…and you’ll want that to be the TOP redirect in your file since it needs to come before anything else.