apache - 在 APACHE 中不使用协议进行重定向
问题描述
我想编写一个 httpd 配置重定向,从某个页面到另一个页面,但不强制加密协议(http/https),我尝试了多个示例,尽管它们都不起作用。我的一些想法:
1) 开启重写引擎
RewriteCond "%{HTTP_REFFERER}" "^/something/$"
RewriteRule "^/something/$" "%{REQUEST_SCHEME}example.com/test/test1.html"
2)我希望能以某种方式工作
RewriteRule "^/something/$"
"%{REQUEST_SCHEME}example.com/test/test1.html.html" [R=301]
3)什么工作,但正如你所见,我必须使用 http 或 https,这是我不想要的
RedirectMatch 301 "^/something/$" "http://example.com/test/test1.html.html"
解决方案
推荐阅读
- mysql - 使用 CASCADE 删除行时显示警告
- git - 在 git add --patch 提示之间插入空行
- list - Flutter:如何将动态列表保存到共享首选项
- spring-cloud-config-server - Spring 配置服务器在启动时删除基本目录?
- html - 如何从 HTML 对话框运行 Apps 脚本函数?
- javascript - React Virtualized Multigrid 在自身之上渲染
- python - 使用循环导入多个 csv 文件
- javascript - 数据未保存在 Firestore 中
- c# - 使用 Azure AD 身份验证的 ASP.NET MVC Core 3.1 中的自定义用户数据?
- mysql - AUTO_INCREMENT 索引重复条目