title: apache 2.2.22 mod_rewrite RewriteCond, how to set the regexp
body: <p>Sorry, my initial description was to short.</p>
  
  <p>What I need to do is, to do two redirects on one base-url with two different conditions.
  First is to redirect a request with just the base-url (like _http://some_url.org) to _http://some_other_url.org .</p>
  
  <pre><code>_http://some_url.org -&gt; _http://some_other_url.org
  </code></pre>
  
  <p>The second one is, if _http://some_url.org/some_subdir is requested it shoud be redirected to SSL of the same host _https://some_url.org/some_subdir .<br>
  So in case 2 it should not be redirected to some_other_url.org .</p>
  
  <pre><code>_http://some_url.org/some_subdir -&gt; https_://some_url.org/some_subdir
  </code></pre>
  
  <p>Both rewrites are not verry complex for its own, but I can't get them working together.<br>
  So my problem is, how do I have to set the RewriteCond (to be exact the regexp) to do the matching. The http->https overrules always.</p>
  
  <p>I did several experiments with RewriteCond, RewriteRule, RedirectMatch but I didn't get it. Does anybody have an idea?</p>
  
  <p>Oh, btw this should be done by the vhost-config, not with .htaccess-files in document-folders. It's a restriction I'm not responsible for :-( cause developers sometimes empty the doc-folders.</p>
  
  <p>Sorry, I had to do this <code>_http</code> because of this editor to not recognize this "URLs".<br>
  thanks a lot</p>
  
  <p>best regards, M. </p>