apache - htaccess :将选定的 url 列表从 http 重定向到 https
问题描述
我想 301 重定向所选 http url ( http://hostname.com/oldressource ) 的列表,每一个都指向一个新的 https url ( http://hostname.com/newressource )。
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,L,R=301]
我有大约 1000 个网址要处理。你能给我一些规则或方法吗?
解决方案
推荐阅读
- c# - 将 ComboBox 的 DisplayMemberPath 绑定到字符串方法
- node.js - 如何使用 hasura 实现自定义身份验证?
- python - 如何从正常的机器学习技术转变为交叉验证?
- javascript - 设置对象数组的状态
- python-3.x - 在jetson nano上启动系统时自动运行python脚本
- java - 如何将您正在创建的 Android 项目的 ID 写入 Firebase 数据库
- angular - 来自 JavaScript 的 location.href 不适用于 iOS 13.4 PWA (Angular 2)
- python - 经过一段时间后,将文本复制到下一个...与 Python 中的 Selenium 链接
- nginx - proxy_set_header 处奇怪的“指令不允许”
- .net - 如何使用复选框(wpf)选择数据网格中的所有行?