【问题标题】:Stop subdomain redirecting to main domain停止子域重定向到主域
【发布时间】:2018-06-14 11:00:34
【问题描述】:

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

RewriteEngine On
RewriteBase / RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://dominio.es/$1 [R=301,L]

我的托管公司给了我 htaccess,所以我的网站从 http 重定向到 https,但我不知道这些代码的含义。 我是网络编程的新手,希望您能提供帮助。

非常感谢!

【问题讨论】:

标签: html .htaccess


【解决方案1】:

这个答案对我有用。我希望这可以帮助别人!

重写引擎开启 RewriteCond %{HTTPS} 关闭 RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-01-18
    • 2015-06-05
    • 1970-01-01
    • 2018-04-08
    • 2016-06-11
    • 2012-07-22
    • 2016-08-13
    • 2013-10-18
    相关资源
    最近更新 更多