title: htaccess Redirect subdomain only without a path
body: <p>I am redirecting the follow domain examples.</p>
  
  <pre><code>example.domain.tld to domain.tld/foo/example-foo.html
  </code></pre>
  
  <p>This works correct, but I need to use another approach when the same subdomain has a path including a specific slug. So I want to prevent with the current redirection I wrote the redirection on this situation</p>
  
  <pre><code>example.domain.tld/foo/
  </code></pre>
  
  <p>My current htaccess redirect</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} !^(www|staging)\. [NC]
  RewriteCond %{HTTP_HOST} ^(.*)\.(.*)\.de [NC]
  RewriteCond %{REQUEST_URI} !^(foo|foo2)[NC] # &lt;== not working
  RewriteRule (.*) https://www.%2.de/foo/%1-foo.html [R=301,L]
  </code></pre>