windows - Windows IIS 将 domain.de 转发到 www.domain.de
问题描述
在我开始之前,我尝试了搜索栏并看到了帖子,但这些并没有真正帮助我。
所以我目前正试图转发我的域以强制使用 HTTPS 和 www。
就像我输入 mydomain.de 时一样,它会将我转发到https://www.mydomain.de
这是我的 web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="http to https secure" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
<add input="{HTTP_HOST}" pattern="^(www.)?speargaming.de" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
我没有看到我在那里做错了什么。
解决方案
推荐阅读
- python - 取消 dict 的子类时出现 AttributeError
- python - python:从工作目录中稳健地导入模块
- php - 我需要替换数字 (555) 564-8583 中的多余字符 我只想允许加号和整数
- sql-server - 从不同数据库上的表更新时 - 无法解决排序规则冲突
- spring-boot - 如何从 ServerHttpRequest 读取 Spring Boot 响应式请求正文
- kubernetes - Kubernetes 入口 nginx grafana 仪表板 prometheus 数据为空
- django - 在 django 表单中隐藏字段表单
- python - python - 如何将气流 dag 配置为每天运行两次
- javascript - 警告:在现有状态转换期间无法更新(例如在 `render` 中)
- javascript - VueJs - 绑定双向父子数据