Forum Moderators: phranque
RewriteCond looking at QUERY_STRING because RewriteRule only sees the path part of the requested URL. (.*) pattern is greedy and ambiguous. It will massively slow your server down as it needs hundreds of "back off and retry" attempts to find a match. You need to find a better pattern like ([^-]+) and ([^\.]+) or similar. $1 and $2 and the "page" as %1 (%1 not $1) from the preceding RewriteCond looking at the QUERY_STRING pattern.
RewriteCond %{QUERY_STRING} ^([^&]*&)*page=([0-9]+)(&.+)?$
RewriteRule convert-([^-]+)-to-([^-]+)\.php$ convert.php?from=$1&to=$2&page=%2 [L]
[edited by: tedster at 3:24 am (utc) on Jun 15, 2010]
[edit reason] Disable graphic smile faces [/edit]
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?example\.net
RewriteRule (.*) http://www.example.com/$1[b]?[/b] [R=301,L] Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1[b]?[/b] [R=301,L]
RewriteCond %{QUERY_STRING} ^([^&]*&)*page=([0-9]+)(&.+)?$
RewriteCond %2>%{QUERY_STRING} ^([^>]+)>([^&]*&)*var2=([^-]+)(&.+)?$
RewriteRule convert-([^-]+)-to-([^-]+)\.php$ convert.php?from=$1&to=$2&page=%1&var2=%3 [L]