1&1 Windows hosting Server web.config URL rewrite issues

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 21:43:07

问题


I am facing an issue related to URL rewrite in windows server hosted by 1&1. i am trying to rewrite the urls using web.config file but it's not working at all giving me the error or 500.19

Error Summary HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information Module IIS Web Core Notification Unknown Handler Not yet determined Error Code 0x8007000d Config Error
Config File \?\E:\kunden\homepages\0\d637982794\www\flight2day\web.config

Requested URL https://flight2day.co.uk:443/ Physical Path
Logon Method Not yet determined Logon User Not yet determined Failed Request Tracing Log Directory faultRequestLogPath

here is the web.config code

<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>

here is .htaccess code

<IfModule mod_rewrite.c>
 Options +SymLinks
 AddType x-mapp-php5 .php
 RewriteEngine On
 RewriteBase /
</IfModule>

来源:https://stackoverflow.com/questions/45887386/11-windows-hosting-server-web-config-url-rewrite-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!