Link to home
Start Free TrialLog in
Avatar of jblayney
jblayneyFlag for Canada

asked on

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*
Avatar of Robert Granlund
Robert Granlund
Flag of United States of America image

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>
Avatar of jblayney

ASKER

thank you for responding, no luck with that
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..
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.
ASKER CERTIFIED SOLUTION
Avatar of jblayney
jblayney
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial