'NGINX break $url (nginx remove route)

Can i ask you how can i remove the part of https://website.my/page?ref=param1 and get only i.e https://website.my/param1

Thank you for responding too soon! Cya. Have a nice day.

    location / {
        rewrite ^/(.*)$.php /index.php?ref=$1? break;
    }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source