I have configured Apache 2.2 with mod_jk and it is working fine, But in one scenario I need to rewrite from mydomain1 to mydomain2.com I have googled for this and found some solution (as in below), But It's not working.
Any help would be much appreciated., Thanks
<IfModule jk_module>
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogStampFormat "[%b %d %Y - %H:%M:%S] "
JkRequestLogFormat "%w %V %T"
JkLogLevel info
<VirtualHost *:80>
ServerAdmin admin@www.mydomain1.com
DocumentRoot "C:/apache_docs"
ServerName www.mydomain1.com
ErrorLog logs/www.mydomain1com_log
CustomLog logs/www.mydomain1com_log combined
JkMount / mydomain1
JkMount /* mydomain1
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.mydomain1.com$ [NC] RewriteRule ^(.*)$ mydomain2.com/$1 [R=301,L]
</IfModule>
</VirtualHost>
</IfModule>