0

I am working on a drupal multisite, therefore, my redirects get added to the same htaccess. The problem is my RewriteCond are not working correctly.

My RewriteRule for example1.com is also working on example2.com which I do not want. These redirects are site specific. Can anyone see what I am doing wrong?

# START redirects of example1.com
RewriteCond %{HTTP_HOST} ^stage\.example1\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^example1\.com [NC]
RewriteRule ^products/new-equipment/marine-engines$ /products/new/marine [R=301,L]
# END redirects of example1.com

# START redirects of example2.com
RewriteCond %{HTTP_HOST} ^stage\.example2\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^example2\.com [NC]
RewriteRule ^products/new/machines/405/(.*) /products/new [R=301,L]
# END redirects of example2.com
Ronnie
  • 113
  • 1
  • 4
  • This looks correct to me. – Jason Martin Jun 26 '17 at 17:48
  • Dang, I was afraid of that response lol. I'd also like to note that redirects on `example2.com` are working on `example1.com` as well. – Ronnie Jun 26 '17 at 18:21
  • 1
    I figured it out..didn't realize rewritecond's only apply to just the following rule. My code above was a trimmed version so yep what I posted was correct – Ronnie Jun 26 '17 at 18:53

0 Answers0