Hi,
I have a below code in mod-rewrite.txt
RewriteEngine On
RewriteRule /\.htaccess$ - [F]
RewriteCond %{HTTP_HOST} !www\.espireinfo\.com$
RewriteRule ^(.*)$ http://www\.espireinfo\.com$1 [R=301,L]
RewriteRule ^/schools/index.aspx$ /schools/english-language.aspx [R=301,L]
RewriteRule ^/about/Contact.aspx$ /about/contact.aspx [R=301,L]
As you can see that above is using www.espireinfo.com domain for rewriting. I want one more domain www.rai.com with below configuration to be written in same mod-rewrite file.
RewriteCond %{HTTP_HOST} !www\.rai\.com$
RewriteRule ^(.*)$ http://www\.rai\.com$1 [R=301,L]
RewriteRule ^/schools/index.aspx$ /schools/eng-lang.aspx [R=301,L]
RewriteRule ^/about/Contact.aspx$ /about/contactdetails.aspx [R=301,L]
So my complete mod-rewrite.txt file will be given as below:
RewriteEngine On
RewriteRule /\.htaccess$ - [F]
RewriteCond %{HTTP_HOST} !www\.espireinfo\.com$
RewriteRule ^(.*)$ http://www\.espireinfo\.com$1 [R=301,L]
RewriteRule ^/schools/index.aspx$ /schools/english-language.aspx [R=301,L]
RewriteRule ^/about/Contact.aspx$ /about/contact.aspx [R=301,L]
RewriteCond %{HTTP_HOST} !www\.rai\.com$
RewriteRule ^(.*)$ http://www\.rai\.com$1 [R=301,L]
RewriteRule ^/schools/index.aspx$ /schools/eng-lang.aspx [R=301,L]
RewriteRule ^/about/Contact.aspx$ /about/contactdetails.aspx [R=301,L]
I tried this but is it only responding to first domain www.espireinfo.com.
Is it possible to control two domain with same rewriterule in same mod-rewrite.txt file.
Please suggest what I can do to solve this issue. I will be very grateful for your help!