Hi, I am trying to use this redirect, but it isn't doing anything.

PHP Code:
RewriteRule ^directory/page.shtml?ref=testhttp://www.website.com/page.shtml?ref=test2 [R=301,L] 
Any ideas why it doesn't work?

Thanks