Using .htaccess to redirect traffic causes a redirect loop

I am trying to redirect users to a different url when they access my web application from a particular url. For example, if they use 1.2.3.4:80 To visit the web application, I want to redirect them to 1.2.3.5:8989.

This is my .htaccess case file:

RewriteEngine On
    RewriteCond %{HTTP_HOST} !http://1.2.3.4:80$ (NC)
    RewriteRule ^(.*)$ http://1.2.3.5:8989$1 (L,R=301)

When I access the site using 1.2.3.4:80 redirects to 1.2.3.5:8989 but repeatedly concatenates it in the url bar. For example:

1.2.3.5:8989/1.2.3.5:8989/1.2.3.5:8989/1.2.3.5:8989 etc.

I also get the error ERR_TOO_MANY_REDIRECTS.