htaccess Redirect 301 ignored in drupal site

jblayney used Ask the Experts™

I have changed part of  an old Drupal Site to a Wordpress site in a subdomain.  

The main part of the Drupal site still exists, I have just taken the shopping cart portion and built it in a Wordress, which sits in a subdomain

I am trying to redirect the old product pages ot the new ones, but my htaccess code is ignored..

Options +FollowSymLinks
RewriteEngine on

Redirect 301  /cgi-bin/commerce.cgi?preadd=action&key=A30-E

Open in new window

I have tried writing the redirect a few ways, all are ignored..  Redirect, RedirectMatch 301, redirectPermanent, etc.

I do have a lor of products as well, it would be good if I could do a wildcard for all /cgi-bin/*
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

Redirect 301  /cgi-bin/commerce.cgi?preadd=action&key=A30-E


thank you for responding, no luck with that


Now this works for a wildcard

RedirectMatch 301 ^/cgi-bin/commerce.cgi?.*$

How can i also make that work for individual pages..
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Maybe it has something to do with the directory it is pointing to for the cgi-bin ?
I am a little over my head at the moment but for symbolic links, Allow Override needs to be enabled.

This may shed some light.  Also, give it a little bit and someone smarter than me will be by with an answer.
I went with this

RedirectMatch 301 ^/cgi-bin/commerce.cgi?.*$

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial