How to write multiple rewrite conditions and rules in one .htaccess file for redirecting urls?
snippet in htaccess

How to write multiple rewrite conditions and rules in one .htaccess file for redirecting urls?

user1623

RewriteEngine on

RewriteCond %{HTTP_HOST} ^www\.subsite\.site\.com$ [NC]
RewriteRule ^/?$ /directory/subdirectory/ [R=301,L]

RewriteCond %{HTTP_HOST} ^subsite.site\.com [NC]
RewriteRule ^(.*)$ http://www.subsite.site.com/$1 [R=301,L]