zoukankan      html  css  js  c++  java
  • 让IIS支持DZ和PW的伪静态方法

    1、先在服务器上安装这个插件:
    http://www.isapirewrite.com/download/isapi_rwl_x86_0059.msi

    2、然后给IIS添加ISAPI筛选器 (这步应该是安装后自动生成,不需要操作,只需要检查一下是否存在就行)



    3、最后修改httpd.ini(在ISAPI_Rewrite安装目录下)
    添加以下代码:
    [ISAPI_Rewrite]
    # 3600 = 1 hour
    CacheClockRate 3600
    RepeatLimit 32
    # Protect httpd.ini and httpd.parse.errors files
    # from accessing through HTTP
    DZ的静态规则(这句话不要,只是说明)
    RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)$ $1/archiver/index\.php\?$2
    RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay\.php\?fid=$2&page=$3
    RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3
    RewriteRule ^(.*)/profile-(username|uid)-(.+?)\.html$ $1/viewpro\.php\?$2=$3
    RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space\.php\?$2=$3
    PW的静态规则(这句话不要,只是说明)
    RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
    RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2

    4、网站后台设置启用静态,OK

  • 相关阅读:
    Less的嵌套规则
    作为函数的mixin
    带参数的Mixin
    Less的Mixin
    Less变量
    sticky-css
    javascript copy 复制到粘贴板的方法
    Storage支持率记录
    cookie session 做登录认证
    vue2.x 微信浏览器中遇到的奇难杂症
  • 原文地址:https://www.cnblogs.com/itecho/p/1331678.html
Copyright © 2011-2022 走看看