You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
5.1 KiB

  1. <?xml version="1.0"?>
  2. <configuration>
  3. <appSettings>
  4. <add key="blog:theme" value="Sevomin"/>
  5. <add key="blog:name" value="اخبار سومین"/>
  6. <add key="blog:description" value="آخرین اخبار توسعه وب سایت سومین"/>
  7. <add key="blog:image" value="http://www.sevom.in/content/images/logo.png"/>
  8. <add key="blog:postsPerPage" value="12"/>
  9. <add key="blog:daysToComment" value="20"/>
  10. <add key="blog:moderateComments" value="true"/>
  11. <add key="blog:email" value="[email protected]"/>
  12. <add key="PreserveLoginUrl" value="true"/>
  13. <add key="webpages:Enabled" value="true"/>
  14. <add key="webpages:Version" value="3.0.0.0"/>
  15. </appSettings>
  16. <system.web>
  17. <compilation debug="true" targetFramework="4.5"/>
  18. <httpRuntime targetFramework="4.5" enableVersionHeader="false" requestValidationMode="2.0"/>
  19. <pages validateRequest="false"/>
  20. <customErrors mode="RemoteOnly" defaultRedirect="~/">
  21. <error statusCode="404" redirect="~/404/"/>
  22. </customErrors>
  23. <authentication mode="Forms">
  24. <forms defaultUrl="~/" loginUrl="~/views/login.cshtml" name="miniblog" timeout="10080">
  25. <credentials passwordFormat="SHA1">
  26. <!-- Password is "demo". Generate your hash password here http://www.stringfunction.com/sha1-hash.html -->
  27. <user name="admin" password="b7986da6e43a61189f546cc51a0b37dcad99e079"/>
  28. </credentials>
  29. </forms>
  30. </authentication>
  31. <machineKey decryption="AES" validation="SHA1" decryptionKey="435D9CC99471D1E7C70FFEBA5EC71F28048BF9016605B82CC69B091FD317B294" validationKey="25C5D98CE093E77C2F886A6D8C6DA8FBC77CD764A1BF49E5D30CD123C5E19553"/>
  32. </system.web>
  33. <system.net>
  34. <mailSettings>
  35. <smtp>
  36. <network host="ml01.anaxanet.com" port="25" enableSsl="false"/>
  37. </smtp>
  38. </mailSettings>
  39. </system.net>
  40. <system.webServer>
  41. <urlCompression doDynamicCompression="true" doStaticCompression="true"/>
  42. <handlers>
  43. <add name="CommentHandler" verb="*" type="CommentHandler" path="/comment.ashx"/>
  44. <add name="PostHandler" verb="POST" type="PostHandler" path="/post.ashx"/>
  45. <add name="MetaWebLogHandler" verb="POST,GET" type="MetaWeblogHandler" path="/metaweblog"/>
  46. <add name="FeedHandler" verb="GET" type="FeedHandler" path="/feed/*"/>
  47. <add name="CssHandler" verb="GET" type="MinifyHandler" path="*.css"/>
  48. <add name="JsHandler" verb="GET" type="MinifyHandler" path="*.js"/>
  49. </handlers>
  50. <httpErrors>
  51. <remove statusCode="404"/>
  52. <error statusCode="404" responseMode="ExecuteURL" path="/404.cshtml"/>
  53. </httpErrors>
  54. <staticContent>
  55. <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365:00:00"/>
  56. </staticContent>
  57. <security>
  58. <requestFiltering allowDoubleEscaping="true">
  59. <fileExtensions>
  60. <remove fileExtension=".cshtml"/>
  61. <add fileExtension=".cshtml" allowed="true"/>
  62. </fileExtensions>
  63. </requestFiltering>
  64. </security>
  65. <defaultDocument>
  66. <files>
  67. <remove value="index.cshtml"/>
  68. <add value="index.cshtml"/>
  69. </files>
  70. </defaultDocument>
  71. <rewrite>
  72. <rules>
  73. <rule name="Remove WWW" patternSyntax="Wildcard" stopProcessing="true">
  74. <match url="*"/>
  75. <conditions>
  76. <add input="{CACHE_URL}" pattern="*://www.*"/>
  77. </conditions>
  78. <action type="Redirect" url="{C:1}://{C:2}" redirectType="Permanent"/>
  79. </rule>
  80. <rule name="BlogEngine slug" stopProcessing="true">
  81. <match url="^post/(.*)\.aspx" ignoreCase="true"/>
  82. <action type="Redirect" redirectType="Permanent" url="/post/{R:1}"/>
  83. </rule>
  84. <rule name="slug" stopProcessing="true">
  85. <match url="^post/(.*)" ignoreCase="true"/>
  86. <action type="Rewrite" url="/?slug={R:1}"/>
  87. </rule>
  88. <rule name="paging" stopProcessing="true">
  89. <match url="^(page/)([\d]{0,})" ignoreCase="true"/>
  90. <action type="Rewrite" url="/?page={R:2}"/>
  91. </rule>
  92. <rule name="category" stopProcessing="true">
  93. <match url="^category/([^/]+)(/page/)?([\d]+)?" ignoreCase="true"/>
  94. <action type="Rewrite" url="/?category={R:1}&amp;page={R:3}"/>
  95. </rule>
  96. <rule name="robots.txt" stopProcessing="true">
  97. <match url="robots.txt"/>
  98. <action type="Rewrite" url="views/robots/robots.cshtml"/>
  99. </rule>
  100. <rule name="sitemap" stopProcessing="true">
  101. <match url="sitemap.xml"/>
  102. <action type="Rewrite" url="views/robots/sitemap.cshtml"/>
  103. </rule>
  104. <rule name="fingerprint" stopProcessing="true">
  105. <match url="(.*)(v-[0-9]+/)([\S]+)"/>
  106. <action type="Rewrite" url="{R:1}/{R:3}"/>
  107. </rule>
  108. </rules>
  109. <outboundRules>
  110. <rule name="Remove ETag">
  111. <match serverVariable="RESPONSE_ETag" pattern=".+"/>
  112. <action type="Rewrite" value=""/>
  113. </rule>
  114. <rule name="Send correct Vary">
  115. <match serverVariable="RESPONSE_Vary" pattern=".+"/>
  116. <action type="Rewrite" value="Accept-Encoding, If-Modified-Since"/>
  117. </rule>
  118. </outboundRules>
  119. </rewrite>
  120. </system.webServer>
  121. </configuration>