没有按预期工作,但用 PHP 解决了,不胜感激:
.htaccess
DirectoryIndex index.php
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?esource\.mx$ [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?esource\.com\.mx$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.esc-nube\.com$ [NC]
RewriteRule .* http://esc-nube.com/ [R=301,L]
RewriteCond %{HTTP_HOST} ^(www\.)?esource\.us$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.esc-cloud\.com$ [NC]
RewriteRule .* http://esc-cloud.com/ [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.esourcecapital\.com$ [NC]
RewriteRule .* http://esourcecapital.com/ [R=301,L]
索引.php
<?php
$domain = $_SERVER['HTTP_HOST'];
if ($domain == "esourcecapital.com") {
$filename = "esc.html";
} if ($domain == "esc-nube.com") {
$filename = "es.html";
} if ($domain == "esc-cloud.com") {
$filename = "en.html";
}
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
echo $contents;
?>
有什么提速技巧吗?