Redirecting URLs with specific parameters to friendly URL pages

Discussion in 'Install/Configuration' started by subBlue, Feb 16, 2007.

  1. subBlue

    subBlue Active Member

    I'm trying to redirect some legacy URLs for a site we have redesigned that have the format: /services/services.asp?p=13 going to /services/accomodation

    I've been trying rewrite rules like:
    RewriteRule ^/services/services.asp?p=13 /services/accommodation [R=301,L]
    RewriteRule ^/services/services.asp?p=70 /services/activities [R=301,L]
    However, the original URL isn't getting matched because the rule will only match until the parameters. Any suggestions on getting around this?
  2. mistwang

    mistwang LiteSpeed Staff

    Yes, rewriteRule only match URI, excludes QUERY_STRING. You need to use RewriteCond to match "p=13" with %{QUERY_STRING}.

Share This Page