如何只redirect一个域名站点

我在我的文件夹.htaccess的所有网站redirect到https。 我只想将awesomesites.comredirect到https。

Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{HTTP_HOST} ^www\.awesomesites\.com [NC] RewriteRule ^(.*)$ https://awesomesites.com/$1 [R=301,L] RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] RewriteRule ^download/(.*) /index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] 

目前它将所有网站redirect到https。

您可以添加另一个条件到您的HTTPSredirect,如下所示:

 RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} awesomesites\.com [NC] RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 

这将只会将stream量redirect到awesomesites.com域以HTTPS