htaccess Redirect 301 ignored in drupal site

jblayney
jblayney used Ask the Experts™
on
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*
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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>

Author

Commented:
thank you for responding, no luck with that

Author

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..
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.  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.
Commented:
I went with this

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

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