Redirect to another domain

Foreign site given – _./.?user=1&password=123456

I would like to make a script like this, _./.?user=1&password=123456

When navigating here => _./.?user=1&password=123456to open someone else’s site (_./.?user=1&password=123456).

Do not offer grabbers. Question: Is this possible?

Answer 1, authority 100%

Yes. Read about mod_rewrite
put .htaccess and write there:

RewriteEngine On
RewriteRule ^(.*) http://./$1 [L,P,QSA]

As a result, all requests will go to someone else’s site, but your site will be displayed in the address bar.

Answer 2, authority 50%

Maybe like this:

if ($ref!='') $ref='?'.$ref;
header('HTTP/1.1 301 Moved Permanently');
header('Location: http:// '.$ref);

Answer 3