apache - Apache 2 不重写 https 流量
问题描述
Apache 2.3 不重写 https 流量,这是我的 htaccess
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^example.it$ [OR]
RewriteCond %{HTTP_HOST} ^www.example.it$ [OR]
RewriteCond %{HTTP_HOST} ^www.example.com$ [OR]
RewriteCond %{HTTP_HOST} ^example.org$
RewriteRule ^(.*)$ https://www.example.org%{REQUEST_URI} [R=301,L]
这是site-aviable中的mi example.conf
AccessFileName .htaccess
<Directory /www/example.org/>
Options FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
但不适用于httpS!仅重写 http 流量
我想如果你写 https:// 或 http:// 或没有 http(s) 一切都重定向到https://www.example.org 怎么办?
此致
解决方案
推荐阅读
- reporting-services - SSRS 在字段右侧添加空格
- networking - 我们可以使用定向广播作为有限广播吗?请参阅下面的场景
- google-analytics - 在 BigQuery 中按 Google Analytics 自定义维度过滤
- apache-spark - Spark批量加载文件集合并从每个文件中找到包含文件级别附加信息的行
- python-3.x - Scrapy - TypeError:“规则”对象不可迭代
- javascript - 如何在网格系统中放置 D3js 图表?
- angular - 角度 2 显示单击行的浮动 div
- ruby-on-rails - 在 Rails 中有很多关联
- server-side - 服务器端事件和 Web hook [反向 API] 有什么区别?
- angular - 在 ngOnDestroy 回调中完成 Output() 事件发射器