The code works on my local machine (IIS-7.5) but not online (on IIS-10)
HTTP Error 500.19 - 0x8007000d - Internal Server Error - "faultRequestLogPath"
"system.webServer" rule seems not to work somehow on online. I'm trying to redirect http to https (and i got it) but i can't get user friendly URLs.
High probably duplicate of this...
<configuration>
<location path="xXx.asp">
<system.webServer>
<httpRedirect enabled="true" destination="https://example.com/" httpResponseStatus="Permanent" />
</system.webServer>
</location>
This "http to https redirection" code works...
...
but below code not...
<system.webServer>
<rewrite>
<rules>
<rule name="Rule 1">
<match url="^(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^/404.asp" ignoreCase="true" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="404.asp" />
</rule>
<rule name="Rule 2">
<match url="^(.*)| ?([_0-9a-z-]+)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="default.asp" ignoreCase="true" negate="true" />
<add input="{URL}" pattern=".css" ignoreCase="true" negate="true" />
<add input="{URL}" pattern=".js" ignoreCase="true" negate="true" />
<add input="{URL}" pattern=".png" ignoreCase="true" negate="true" />
</conditions>
<action type="Rewrite" url="xXx.asp?ulam={R:1}&query={R}" />
</rule>
</rules>
</rewrite>
<defaultDocument enabled="true">
<files>
<clear />
<add value="index.asp" />
<add value="home.asp" />
<add value="default.asp" />
</files>
</defaultDocument>
<httpErrors errorMode="Detailed">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/OaOInternal/DefaultWebs/sedoCurrent/Error404.aspx" responseMode="ExecuteURL" />
</httpErrors>
<handlers>
<add name="IgnoreACCDB" verb="*" path="*.accdb" type="System.Web.HttpForbiddenHandler" />
</handlers>
<staticContent>
<remove fileExtension=".ogv" />
<remove fileExtension=".ogg" />
<mimeMap fileExtension=".7z" mimeType="application/x-7z-compressed" />
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
<mimeMap fileExtension=".webmanifest" mimeType="application/manifest+json" />
</staticContent>
</system.webServer>
</configuration>
To get user friendly URLs i redirected all pages (requests) to one (xXx) page (except of some extensions) and i get the content from database with the help of querystring. But it won't work on IIS-10.
I know you have the solution, probably better one (a compact version of Rule1 and Rule2). Maybe you share it =))
The hosting firm finally replied. system.webServer is disabled. They told me to use .htaccess (and it works). Thanks for answers.