This should do it:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^page=1$
RewriteRule (.*) $1? [R=permanent]
Line by line:
- You turn on the rewriting functionality.
- You specify as a condition (“if statement”) that the query string has to be exactly
page=1
for the following rules to apply. - Then you specify a rule that says substitute the entire path (.*) with itself ($1), but make the query string empty (?), and make the result a permanent redirect (301).
If you want the redirect to be temporary (302) then you can just remove the =permanent
part. Moved Temporarily is the default for the R
flag.