webserver and dns configuration: If you have a new domain, change the old domain's DNS and create a CNAME to your new domain and use http redirection to the new domain if the server name is the old server name
webserver configuration: If the dns didn't change (only the path to the file) or you can't change it, configure the web server to redirect to the new url with http code.
If you don't have access to the webserver, use http meta header like in the post, and/or/rather give a link for the user that he goes to the new address. You can also add dns prefetch meta header to the html, that will speed up the redirection.
JavavScript has nothing to do with it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
No
As this is posted under #help, some additional context or motivation might be useful.