htaccess rewrite based on hostname or domain name

后端 未结 1 637
囚心锁ツ
囚心锁ツ 2020-12-11 00:52

I have two different domains (let\'s say www.site1.com and www.site2.com) that point to the same hosting server.

I need the two different domain names because I want

相关标签:
1条回答
  • 2020-12-11 01:39

    Lawrence Cherone - Thank you, that one works like a charm! Now it works:

    RewriteCond %{HTTP_HOST} ^www\.site1\.com [NC] 
    RewriteRule ^(.*)$ index.php?lang=it [NC,QSA] 
    RewriteCond %{HTTP_HOST} ^www\.site2\.com [NC] 
    RewriteRule ^(.*)$ index.php?lang=en [NC,QSA] 
    

    Of course I check the www redirect before this rule.

    Thank you!!

    0 讨论(0)
提交回复
热议问题