Html 停止子域重定向到主域

Html 停止子域重定向到主域,html,.htaccess,Html,.htaccess,当我搜索子域.domain.es时,我被重定向到domain.es。 htaccess文件中的代码: RewriteEngine On RewriteBase / RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://dominio.es/$1 [R=301,L] 我的托管公司给了我htaccess,所以我的网站被从http重定向到https,但我不知道这些代码的含义。 我是网络编程新手,希望你能帮我 非常感谢 这个答案对我有用。我希

当我搜索
子域.domain.es
时,我被重定向到domain.es。 htaccess文件中的代码:

RewriteEngine On
RewriteBase / RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://dominio.es/$1 [R=301,L]
我的托管公司给了我htaccess,所以我的网站被从http重定向到https,但我不知道这些代码的含义。 我是网络编程新手,希望你能帮我


非常感谢

这个答案对我有用。我希望这能帮助别人

重新启动发动机 重写条件%{HTTPS}关闭
重写规则.{HTTP\u HOST}%{REQUEST\u URI}[L,R=301]

你看到这个问题的答案了吗?看起来您可能需要指定一些值: