htaccess Redirect 301 ignored in drupal site

Hello,

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 https://resources.beststart.org/a30-e-risks-of-cannabis/

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/commerce.cg*
LVL 1
jblayneyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Robert GranlundCommented:
Possibly?

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

Redirect 301  /cgi-bin/commerce.cgi?preadd=action&key=A30-E https://resources.beststart.org/a30-e-risks-of-cannabis/
</IfModule>
jblayneyAuthor Commented:
thank you for responding, no luck with that
jblayneyAuthor Commented:
Now this works for a wildcard

RedirectMatch 301 ^/cgi-bin/commerce.cgi?.*$ https://resources.beststart.org

How can i also make that work for individual pages..
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Robert GranlundCommented:
Maybe it has something to do with the directory it is pointing to for the cgi-bin ?
Robert GranlundCommented:
I am a little over my head at the moment but for symbolic links, Allow Override needs to be enabled.  perishablepress.com/stupid-htaccess-tricks/#ess4

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

RedirectMatch 301 ^/cgi-bin/commerce.cgi?.*$ https://resources.beststart.org

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
htacces

From novice to tech pro — start learning today.