目前,我有两个域名指向同一个网站空间(所以domain1.com/index.html和domain2.com/index.html给出了相同的页面)。我正在尝试配置它,以便如果我转到domain1.com/index.html或domain1.com/test/...我被转发到domain1.com/test/index.html或domain1.com/test/test/...
当我转到domain2.com/index.html时,它不应该被转发,所以我应该只看到domain2.com/index.html
有什么建议吗?我该怎么做?
发布于 2011-03-11 19:02:18
这是未经测试的:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain1.com$
RewriteRule ^(.*)$ /something/$1https://stackoverflow.com/questions/5272025
复制相似问题