Web.Config 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0"?>
  2. <!--
  3. Note: As an alternative to hand editing this file you can use the
  4. web admin tool to configure settings for your application. Use
  5. the Website->Asp.Net Configuration option in Visual Studio.
  6. A full list of settings and comments can be found in
  7. machine.config.comments usually located in
  8. \Windows\Microsoft.Net\Framework\v2.x\Config
  9. -->
  10. <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  11. <configSections>
  12. <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
  13. </configSections>
  14. <appSettings/>
  15. <connectionStrings/>
  16. <system.web>
  17. <!--
  18. Set compilation debug="true" to insert debugging
  19. symbols into the compiled page. Because this
  20. affects performance, set this value to true only
  21. during development.
  22. -->
  23. <compilation debug="true" defaultLanguage="c#" targetFramework="4.0"/>
  24. <!--
  25. The <authentication> section enables configuration
  26. of the security authentication mode used by
  27. ASP.NET to identify an incoming user.
  28. -->
  29. <authentication mode="Windows"/>
  30. <!--
  31. The <customErrors> section enables configuration
  32. of what to do if/when an unhandled error occurs
  33. during the execution of a request. Specifically,
  34. it enables developers to configure html error pages
  35. to be displayed in place of a error stack trace.
  36. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
  37. <error statusCode="403" redirect="NoAccess.htm" />
  38. <error statusCode="404" redirect="FileNotFound.htm" />
  39. </customErrors>
  40. -->
  41. <httpModules>
  42. <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
  43. </httpModules>
  44. <!--urlMappings enabled="true">
  45. <add url="~/redirect" mappedUrl="~/Redirect.aspx" />
  46. </urlMappings-->
  47. <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
  48. <system.webServer>
  49. <modules runAllManagedModulesForAllRequests="true">
  50. <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule"/>
  51. </modules>
  52. </system.webServer>
  53. <rewriter>
  54. <rewrite url="~/redirect" to="~/Redirect.aspx"/>
  55. <rewrite url="~/page/([0-9]+)$" to="~/Page.aspx?pageNumber=$1"/>
  56. <rewrite url="~/page/([0-9]+)(\?)(.*)" to="~/Page.aspx?pageNumber=$1&amp;$3"/>
  57. </rewriter>
  58. </configuration>