title: .htaccess URL Rewrite for not existing dynamic URL
body: <p>We had to close one of the our e-commerce site and have to deal with 404's after permanent redirection.</p>
  
  <p>We have approx. 10K url like below. All of them starts with /gproductinfo~p_template</p>
  
  <p><a href="http://www.domainname.com/gproductinfo~p_template-1-PID-7791-mypage-0-combo_src_siz-0-combo_src_pri-0-combo_src_ord-0-combo_src_cat-122-combo_src_rpp-0-c_type-0-c_color-0-c_weave-0-c_material-0-c_shape-0" rel="nofollow">http://www.domainname.com/gproductinfo~p_template-1-PID-7791-mypage-0-combo_src_siz-0-combo_src_pri-0-combo_src_ord-0-combo_src_cat-122-combo_src_rpp-0-c_type-0-c_color-0-c_weave-0-c_material-0-c_shape-0</a></p>
  
  <p>I would like to 301 all requests which starts /gproductinfo~p_template to another another domain.</p>
  
  <p>I will appreciate any help. </p>
  
  <p>Regards,</p>