我面临与 1&1 托管的 Windows 服务器中的 URL 重写相关的问题。我正在尝试使用 web.config 文件重写 url,但它根本不起作用,给我错误或 500.19
错误总结
HTTP 错误 500.19 - 内部服务器错误
无法访问所请求的页面,因为该页面的相关配置数据无效。
详细错误信息
模块 IIS Web 核心
通知未知
处理者尚未确定
错误代码 0x8007000d
配置错误
配置文件\?\E:\kunden\homepages\0\d637982794\www\flight2day\web.config
请求的网址https://flight2day.co.uk:443/ https://flight2day.co.uk:443/物理路径
登录方式尚未确定
登录用户尚未确定
失败请求跟踪日志目录 failureRequestLogPath
这是 web.config 代码
<configuration>
<system.webServer>
<security>
<authentication>
<basicAuthentication enabled="false" />
</authentication>
</security>
<modules runAllManagedModulesForAllRequests="true" >
<remove name="UrlRoutingModule"/>
</modules>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions>
<add input="{HTTP_HOST}" pattern="^flight2day\.co.uk$" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://www.flight2day.co.uk/{R:1}" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<defaultDocument enabled="true">
<files>
<clear />
<add value="index.php" />
<add value="index.aspx" />
<add value="index.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="home.aspx" />
<add value="home.asp" />
<add value="home.htm" />
<add value="home.html" />
<add value="default.aspx" />
<add value="default.asp" />
<add value="default.htm" />
<add value="default.html" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
这是.htaccess代码
<IfModule mod_rewrite.c>
Options +SymLinks
AddType x-mapp-php5 .php
RewriteEngine On
RewriteBase /
</IfModule>
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)