How to write basic query redirects in htaccess from an asp site to wordpress

I’ve been attempting to write query redirects from an old version of a website using asp to new pages on a WordPress site. Here is an example what of what I need to have redirected:

http://www.example.com/pc/viewCategories.asp?idCategory=12

Read More

to

http://www.example.com/products/new-product/

Here is what I’ve tried without success:

RewriteEngine On
RewriteCond %{QUERY_STRING} idCategory=12
RewriteRule ^$ /products/new-product/ [R=301,L]

I’m new to htaccess. Thank you for any direction on this.

Related posts

1 comment

Comments are closed.