0

我的 htaccess 文件如下所示:

# BEGIN_WOERP__
RewriteEngine On

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

# handle robots.txt request
RewriteRule ^robots\.txt$ robots.txt [L]

RewriteRule ^sitemap\.xml$ /core/sitemap/ [L]

RewriteCond %{REQUEST_URI} !/(static|static/.*)$
RewriteRule . index.php [L]

# END_WOERP__

# enable expirations
<IfModule mod_expires.c>
ExpiresActive On  
ExpiresDefault "access XXXXXX"
</IfModule>

我有单独的服务器用于本地开发和生产服务器,两台服务器都有相同的 htaccess 文件(上面的文件)。当生产服务器没有将 https 重定向到 http 页面但开发服务器正常工作时(当 https 没有找到给定的 url 然后重定向到 http)

  1. 请解释为什么相同的配置 htaccess 设置给出了两个尊重反应。
  2. 我会为生产服务器中的 https(未找到 https 请求)重定向到 http 做什么?
4

0 回答 0