If you remove the die statement, you will have to make sure to remove all white space between the closing and opening of the php tags. So if there's anything like this:
you want to modify it to look like this:
So it looks like the url variables that you're looking to add are removed by the code. Is there a way you can add the variables to a session variable instead of using url variables?