301 redirect appending the querystring

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 5
Joined: 17 Apr 2014, 11:08

301 redirect appending the querystring

17 Apr 2014, 11:19

I am trying redirect /article.aspx?a=142 to cart.aspx page, 301 redirect is working fine but its redirecting with cart.aspx?a=142.
How do avoid this?

Below is my .htaccess file code

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.72
RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 20
RewriteBase

RewriteRule /article\.aspx\?a=142 /cart.aspx [r=301]
RewriteRule /article\.aspx\?a=143 /tennis-bags/c/2000/ [r=301,L]
RewriteRule /index\.html /tennis-balls/c/3000/ [r=301]

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: 301 redirect appending the querystring

17 Apr 2014, 23:53

Simple enough:

RewriteRule /article\.aspx\?a=142 /cart.aspx? [r=301]

Regards

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 7 guests