title: How to write multiple rewrite conditions and rules in one .htaccess file for redirecting urls?
body: <p>i have sub-site named <code>subsite.site.com</code> (just and example). firstly i want to redirect <code>subsite.site.com</code> to <code>www.subsite.site.com</code>and and finally i want to redirect <code>www.subsite.site.com</code> to <code>www.subsite.site.com/directory/subdirectory/index.html</code></p>
  
  <p>the following rewrite conditions &amp; rules serve this purpose independently.</p>
  
  <pre><code>RewriteEngine on   
  RewriteCond %{HTTP_HOST} ^subsite.site\.com
  RewriteRule ^(.*)$ http://www.subsite.site.com/$1 [R=301,L]
  </code></pre>
  
  <hr>
  
  <pre><code>RewriteEngine on
  RewriteCond %{HTTP_HOST} ^www\.subsite\.site\.com$
  RewriteRule ^/?$ "http\:\/\/www\.subsite\.site\.com\/directory\/subdirectory\/" [R=301,L
  </code></pre>
  
  <p>how shall i combine the above two conditions &amp; rules in a single <code>.htaccess</code> file?</p>
  
  <p>thanks,</p>