0

I am trying to 301 redirect based on two GET variables in this URL: http://www.jwsuretybonds.com/surety-bonds/surety_bond.php?bond_form_id=171&bond_type_id=45

I want to redirect it to: http://www.jwsuretybonds.com/surety-bonds/commercial-bonds/contractor-license-bonds/california/#qual

It appears the solution on this (301 Redirecting URLs based on GET variables in .htaccess) Stack Overflow post is the best practice, but I have no experience with Apache and do not know how to modify this to work with 2 GET variables.

Thanks in advance for any assistance.

Community
  • 1
  • 1
  • Main question is, do you have access to the server config file as root so you can properly make the needed changes for the RewriteMap? – Prix Mar 07 '14 at 04:37

1 Answers1

0

If you have a htaccess file in your document root, here's a 95% start, it is simplified a bit because you don't really care about the values or other query string parameters:

RewriteEngine ON
RewriteCond %{QUERY_STRING} "bond_form_id=171&bond_type_id=45"
RewriteRule surety-bonds/surety_bond.php http://www.jwsuretybonds.com/surety-bonds/commercial-bonds/contractor-license-bonds/california/#qual [R]
covener
  • 17,402
  • 2
  • 31
  • 45
  • That was very helpful. Thank you! After a couple of modifications, I got it working great! [code] RewriteRule surety-bonds/surety_bond.php http://www.jwsuretybonds.com/surety-bonds/commercial-bonds/contractor-license-bonds/california/#qual? [L,R,NE=301][/code] – user3303741 Mar 10 '14 at 15:19