I am looking to only apply certain rules if domain is *.example.com. How can I do this?
##start if domain is *.example.com##
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
RewriteCond %{HTTP_HOST} ^demo
RewriteRule ^robots\.txt$ robots_allow.txt
##end if domain is *.example.com
<IfModule mod_deflate.c>
<filesMatch "\.(js|css|html|php)$">
SetOutputFilter DEFLATE
</filesMatch>
</IfModule>