I need to update my .htaccess file to redirect permanently all URLs from http://example.com/pages/5604/article/something/?page=299
to http://example.com/pages/5604/article/
. Here is my implementation (which sadly doesn't work):
RewriteRule ^pages/(.*)/(.*)/something/\?page=(.*) /pages/$1/$2 [R=301,L]
Thanks in advance for your help and suggestions!