Custom 404 page not found in iis 7 for Classic ASP

I installed a Windows 2008 server with integrated iis 7.0

1 day ago I use windows 2003 and iis 6.0

with the Windows 2008 server, everything is fine, except for one.

in 2003-iis6 I could use custom 404 pages to work with urls. For example, I could set custom404.asp as custom 404 pages (execute url)

In 2008, I can’t do this. when I set the 404 user page to / custom 404.asp nothing happens. on custom error pages he says this is for asp.net

How can i do this?

this is urgent: (

+3
source share
2 answers

webconfig . , -

web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors>
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" subStatusCode="-1" prefixLanguageFilePath="" path="/default.asp" responseMode="ExecuteURL" />
        </httpErrors>
     <rewrite>
        <rules>
            <rule name="MyURLCleaned" enabled="false" stopProcessing="true">
                <match url="^([^])+" />
                <conditions>
                    <add input="{REQUEST_FILENAME}" />

                </conditions>
                <action type="Rewrite" url="/default.asp?{R:0}" />
            </rule>
        </rules>
            <rewriteMaps>
                <rewriteMap name="static">
                </rewriteMap>
            </rewriteMaps>
    </rewrite>

    </system.webServer>
</configuration>
+3

" " IIS " ..." "". , " ".

+5

Source: https://habr.com/ru/post/1747437/


All Articles