全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 747|回复: 4
打印 上一主题 下一主题

apache 的伪静态规则 怎么转换成IIS 6 下的 httpd.ini?

[复制链接]
跳转到指定楼层
1#
发表于 2012-7-16 22:23:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 白日梦 于 2012-7-16 22:30 编辑

如题?




就是 CF image hosting script 有没有 IIS 下的 规则?

  1. <IfModule mod_deflate.c>

  2.         # force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
  3.         <IfModule mod_setenvif.c>
  4.                 <IfModule mod_headers.c>
  5.                         SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s,?\s(gzip|deflate)?|X{4,13}|~{4,13}|-{4,13})$ HAVE_Accept-Encoding
  6.                         RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  7.                 </IfModule>
  8.         </IfModule>

  9.         # html, txt, css, js, json, xml, htc:
  10.         <IfModule filter_module>
  11.                 FilterDeclare   COMPRESS
  12.                 FilterProvider  COMPRESS  DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
  13.                 FilterProvider  COMPRESS  DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
  14.                 FilterChain     COMPRESS
  15.                 FilterProtocol  COMPRESS  change=yes;byteranges=no
  16.         </IfModule>

  17.         <IfModule !mod_filter.c>
  18.         # Legacy versions of Apache
  19.                 AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
  20.                 AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
  21.                 AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
  22.         </IfModule>

  23. </IfModule>

  24. # ----------------------------------------------------------------------
  25. # Expires headers (for better cache control)
  26. # ----------------------------------------------------------------------
  27. <IfModule mod_expires.c>
  28.         ExpiresActive on

  29. # Perhaps better to whitelist expires rules? Perhaps.
  30.         ExpiresDefault                          "access plus 1 month"

  31. # cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
  32.         ExpiresByType text/cache-manifest       "access plus 0 seconds"

  33. # your document html
  34.         ExpiresByType text/html                 "access plus 0 seconds"

  35. # data
  36.         ExpiresByType text/xml                  "access plus 0 seconds"
  37.         ExpiresByType application/xml           "access plus 0 seconds"
  38.         ExpiresByType application/json          "access plus 0 seconds"

  39. # rss feed
  40.         ExpiresByType application/rss+xml       "access plus 1 hour"

  41. # favicon
  42.         ExpiresByType image/x-icon              "access plus 1 week"

  43. # media: images
  44.         ExpiresByType image/gif                 "access plus 1 month"
  45.         ExpiresByType image/png                 "access plus 1 month"
  46.         ExpiresByType image/jpg                 "access plus 1 month"
  47.         ExpiresByType image/jpeg                "access plus 1 month"

  48. # css and javascript
  49.         ExpiresByType text/css                  "access plus 2 months"
  50.         ExpiresByType application/javascript    "access plus 2 months"
  51.         ExpiresByType text/javascript           "access plus 2 months"

  52.         <IfModule mod_headers.c>
  53.                 Header append Cache-Control "public"
  54.         </IfModule>
  55.   
  56. </IfModule>


  57. # ETag removal
  58.         FileETag none

  59. <IfModule mod_rewrite.c>
  60. RewriteEngine on
  61.         ErrorDocument 400 /index.php?err=400
  62.         ErrorDocument 401 /index.php?err=401
  63.         ErrorDocument 403 /index.php?err=403
  64.         ErrorDocument 404 /index.php?err=404
  65.         ErrorDocument 500 /index.php?err=500
  66. #image view
  67.         RewriteRule ^pm-(.*)\.(jpg|jpeg|png|gif|html)$ thumbnail.php?pm=$1 [L]
  68.         RewriteRule ^pt-(.*)\.(jpg|jpeg|png|gif|html)$ thumbnail.php?pt=$1 [L]
  69.         RewriteRule ^dt-(.*)\.(jpg|jpeg|png|gif)$ index.php?dt=$1 [L]
  70.         RewriteRule ^dm-(.*)\.(jpg|jpeg|png|gif)$ index.php?dm=$1 [L]
  71.         RewriteRule ^di-(.*)\.(jpg|jpeg|png|gif|bmp)$ index.php?di=$1 [L]
  72.         RewriteRule ^dl-(.*)\.(jpg|jpeg|png|gif|bmp)$ index.php?dl=$1 [L]
  73. #Gallery
  74.         RewriteRule ^gallery/$ gallery.php [L]
  75.         RewriteRule ^gallery/([0-9]+)/$ gallery.php?p=$1 [L]
  76.         RewriteRule ^gallery/(.*)/([0-9]+)/$ gallery.php?p=$2&o=$1 [L]
  77.         RewriteRule ^gallery/([A-Za-z])/page([0-9]+)\.html$ gallery.php?p=$2&o=$1 [L]
  78. #sitemap
  79.         RewriteRule ^sitemap.xml$ sitemap.php [L]
  80. </IfModule>
复制代码

评分

参与人数 1威望 +10 收起 理由
单手摘月 + 10 我也不會

查看全部评分

2#
发表于 2012-7-16 22:24:18 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
3#
发表于 2012-7-16 22:29:33 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
4#
 楼主| 发表于 2012-7-16 22:30:52 | 只看该作者
唉!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

知识就是力量。。
5#
 楼主| 发表于 2012-7-16 22:45:09 | 只看该作者
没人知道吗??

评分

参与人数 1威望 +1 收起 理由
单手摘月 + 1 给你加点分安慰下。。。

查看全部评分

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-12 20:26 , Processed in 0.194478 second(s), 18 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表