Q:

htaccess: Why 301 redirect doesn't work for single page but works for all pages in general?

It works for all page:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule (.*) http://www.newdomain.ru/somepage/ [R=301,L]

But I would like to redirect single page. This code doesn't do redirect:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^thePageOnOldDomain.php?someGetParameter=1 http://www.newdomain.ru/somepage/ [R=301,L]

A:

You can't match against the query string (everything after the ?) In a rewrite rule. Use the %{QUERY_STRING} various
RewriteCond %{QUERY_STRING} someGetParameter=1
RewriteRule ^someoldpage.php$ http://newdomain.ru/ [L,R=301]

