Because the website program applies the "ISAPI application (URL rewriting)" technology, Configure the server to support "ISAPI application (URL rewriting)". The specific operations are as follows:
IIS-> website properties-> Home Directory-> Configuration-> application configuration-> Add/edit application extension ing
A. Executable File: C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ aspnet_isapi.dll
B. Extension:. htm
C. Check whether the file exists.
D. OK
The specific rewrite rules are in the web. config file:
<? Xml version = "1.0"?>
<Configuration>
<ConfigSections>
<Section name = "CustomConfiguration" type = "URLRewriter. Config. UrlsSection, URLRewriter"/>
</ConfigSections>
<Deleetask>
<Add key = "FCKeditor: BasePath" value = "/dep_ B/201003_ybdq/FckEditor/"/>
<Add key = "FCKeditor: UserFilesPath" value = "/dep_ B/201003_ybdq/UploadFiles/"/>
<! -- <Add key = "LocalSqlServer" value = "Server = 192.168.8.100; User = sa; Pwd = password; database = OnLineExam"/> -->
</AppSettings>
<ConnectionStrings>
<Add name = "DBPath" connectionString = "~ /App_Data/Web. mdb "/>
<! -- Database path, previous ~ Must be retained -->
</ConnectionStrings>
<System. web>
<! -- <HttpRuntime maxRequestLength = "2097151" useFullyQualifiedRedirectUrl = "true" executionTimeout = "45"/> -->
<HttpHandlers>
<Add verb = "POST, GET" path = "ajaxpro/*. ashx" type = "AjaxPro. AjaxHandlerFactory, AjaxPro.2"/>
<Remove verb = "*" path = "*. asmx"/>
<Add verb = "*" path = "*. asmx "validate =" false "type =" Microsoft. web. script. services. scriptHandlerFactory, Microsoft. web. extensions, Version = 1.0.61025.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 "/>
<Add verb = "*" path = "* _ AppService. axd "validate =" false "type =" System. web. script. services. scriptHandlerFactory, System. web. extensions, Version = 1.0.61025.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 "/>
<Add verb = "GET, HEAD" path = "ScriptResource. axd "type =" System. web. handlers. scriptResourceHandler, System. web. extensions, Version = 1.0.61025.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 "validate =" false "/>
</HttpHandlers>
<HttpModules>
<! -- In this way, you can use response -->
<Add name = "ScriptModule" type = "System. Web. Handlers. ScriptModule, System. Web. Extensions, Version = 1.0.61025.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35"/>
<Add type = "URLRewriter. RewriterModule, URLRewriter" name = "RewriterModule"/>
</HttpModules>
<! -- <Authentication mode = "Forms"/> -->
<! --
Set compilation debug = "true" to insert the debugging symbol
Compiled pages. However, this
Performance is affected, so this value is only available during development.
Set to true.
-->
<! -- <Compilation debug = "true"> -->
<Compilation debug = "true" batch = "false">
<Assemblies>
<Add assembly = "System. Design, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = B03F5F7F11D50A3A"/>
</Assemblies>
</Compilation>
<! --
In the <authentication> section, you can configure
Security Authentication mode,
To identify the user.
-->
<Authentication mode = "Windows"/>
<! --
If an unprocessed error occurs during request execution,
You can configure the corresponding processing steps in the <mermerrors> section. Specifically,
This section allows developers to configure
Html error page to be displayed
To replace the error stack trace.
<CustomErrors mode = "RemoteOnly" defaultRedirect = "GenericErrorPage.htm">
<Error statusCode = "403" redirect = "NoAccess.htm"/>
<Error statusCode = "404" redirect = "FileNotFound.htm"/>
</CustomErrors>
-->
<CustomErrors mode = "Off" defaultRedirect = "NoAccess.htm">
<Error statusCode = "403" redirect = "NoAccess.htm"/>
<Error statusCode = "404" redirect = "FileNotFound.htm"/>
</CustomErrors>
<Globalization requestEncoding = "gb2312" responseEncoding = "gb2312"/>
<Pages validateRequest = "false"/>
</System. web>
<CustomConfiguration>
<Urls>
<Add virtualUrl = "~ /Cn/index/index.htm "destinationUrl = "~ /Cn/index. aspx "/>
<Add virtualUrl = "~ /Cn/abouts/index _ (\ d1_0000.htm "destinationUrl = "~ /Cn/about/index. aspx? Id = $1 "/>
<Add virtualUrl = "~ /Cn/abouts/yg.htm "destinationUrl = "~ /Cn/about/ygtd. aspx "/>
<Add virtualUrl = "~ /Cn/abouts/ygshow _ (\ d1_0000.htm "destinationUrl = "~ /Cn/about/ygshow. aspx? Id = $1 "/>
<Add virtualUrl = "~ /Cn/abouts/down _ (\ d1_0000.htm "destinationUrl = "~ /Cn/about/down. aspx? Type = $1 "/>
<Add virtualUrl = "~ /Cn/abouts/downshow _ (\ d1_0000.htm "destinationUrl = "~ /Cn/about/downshow. aspx? Id = $1 "/>
<Add virtualUrl = "~ /Cn/news/index _ (\ d1_0000.htm "destinationUrl = "~ /Cn/new/index. aspx? Type = $1 "/>
<Add virtualUrl = "~ /Cn/news/newsshow _ (\ d1_0000.htm "destinationUrl = "~ /Cn/new/xwshow. aspx? Id = $1 "/>
<Add virtualUrl = "~ /Cn/service/index.htm "destinationUrl = "~ /Cn/server/index. aspx? Id = 1221 "/>
<Add virtualUrl = "~ /Cn/service/case.htm "destinationUrl = "~ /Cn/server/case. aspx "/>
<Add virtualUrl = "~ /Cn/service/px.htm "destinationUrl = "~ /Cn/server/px. aspx "/>
<Add virtualUrl = "~ /Cn/service/pxshow _ (\ d1_0000.htm "destinationUrl = "~ /Cn/server/pxshow. aspx? Id = $1 "/>
<Add virtualUrl = "~ /Cn/service/faq.htm "destinationUrl = "~ /Cn/server/faq. aspx "/>
<Add virtualUrl = "~ /Cn/service/download.htm "destinationUrl = "~ /Cn/server/download. aspx "/>
<Add virtualUrl = "~ /Cn/service/liuyan.htm "destinationUrl = "~ /Cn/server/exchange. aspx "/>
<Add virtualUrl = "~ /Cn/web/index _ (\ d1_0000.htm "destinationUrl = "~ /Cn/web/index. aspx? Id = $1 "/>
<Add virtualUrl = "~ /Cn/job/index.htm "destinationUrl = "~ /Cn/job/index. aspx? Id = 1224 "/>
<Add virtualUrl = "~ /Cn/job/job.htm "destinationUrl = "~ /Cn/job. aspx "/>
<Add virtualUrl = "~ /Cn/job/jobshow _ (\ d1_0000.htm "destinationUrl = "~ /Cn/job/jobshow. aspx? Id = $1 "/>
<Add virtualUrl = "~ /Cn/job/appjob.htm "destinationUrl = "~ /Cn/job/appjob. aspx "/>
<Add virtualUrl = "~ /Cn/contact/index _ (\ d1_0000.htm "destinationUrl = "~ /Cn/contact/index. aspx? Id = $1 "/>
<Add virtualUrl = "~ /Cn/product/index.htm "destinationUrl = "~ /Cn/product/index. aspx "/>
<Add virtualUrl = "~ /Cn/product/indextype _ (\ d1_0000.htm "destinationUrl = "~ /Cn/product/indextype. aspx? Typeid = $1 "/>
<Add virtualUrl = "~ /Cn/product/indextypeclass _ (\ d?#.htm "destinationUrl = "~ /Cn/product/indextypeclass. aspx? Typeid = $1 "/>
<Add virtualUrl = "~ /Cn/product/productlist _ (\ d1_0000.htm "destinationUrl = "~ /Cn/product/prolist. aspx? Typeid = $1 "/>
<Add virtualUrl = "~ /Cn/product/productshow _ (\ d1_0000.htm "destinationUrl = "~ /Cn/product/proshow. aspx? Id = $1 "/>
<Add virtualUrl = "~ /Cn/product/productsearchlist.htm "destinationUrl = "~ /Cn/product/prolist. aspx "/>
</Urls>
</CustomConfiguration>
</Configuration>