title: Conditional 301 redirect htaccess match domain and uri
body: <p>I have another redirect question. I am trying to add a condition to a few redirects (I have 50+ in the same file). the redirects that work are just domain conditional, meaning if the %{HTTP_HOST} matches then it goes. Now i am trying something with a few of them that does that but also needs to only redirect a specific folder only. This is what I have:</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{REQUEST_URI} ^/some/page.php
  RewriteCond %{HTTP_HOST} (^|\.) domain\.com$
  RewriteRule ^ https://www.example.com/some/new/page/ [R=301,L]
  </code></pre>
  
  <p>Simply put I am trying to match a specific domain and URI and forward that to a new domain and page. ex:
  domain.com/account/blah.php</p>
  
  <p>redirect to 
  www.example.com/some/new/page/</p>
  
  <p>and at the same time I have another redirect for the domain if no URI they are both specified like this:</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{HTTP_HOST} (^|\.) domain\.com$
  RewriteRule ^ https://www.example.com/some/other/new/page/ [R=301,L]
  RewriteCond %{REQUEST_URI} ^/some/page.php
  RewriteCond %{HTTP_HOST} (^|\.) domain\.com$
  RewriteRule ^ https://www.example.com/some/new/page/ [R=301,L]
  </code></pre>
  
  <p>Any idea what i am doing wrong?</p>