zoukankan      html  css  js  c++  java
  • destoon 下apache伪静态排除目录规则

       apache伪静态排除目录规则:

    排除某个文件夹:
    方法1:
    RewriteRule ^(statics|api|uploadfile|)(.*) - [L]

    方法2:
    RewriteCond $1 !^(search|list|view|api)

    以destoon为例:

      

    #Rewrite Rules
    ErrorDocument 404 /404.php
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^whwhjy.com [NC]
    RewriteRule ^(.*)$ http://www.whwhjy.com/$1 [L,R=301]
    RewriteRule ^(.*)/(admin|cache|editor|file|include|lang|module|skin|template)/(.*).php(.*)$ 404.php
    RewriteRule ^(yzmb|xwzx|pic|zzry|xmal)(.*) - [L]
    RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
    RewriteRule ^(.*)/([0-9]+)([-])?([0-9]+)?.html$ $1/show.php?itemid=$2&page=$4
    RewriteRule ^(.*)/([0-9]+)([-])?([0-9]+)?.html$ $1/show.php?itemid=$2&page=$4
    RewriteRule ^(.*)/show-([0-9]+)([-])?([0-9]+)?.html$ $1/show.php?itemid=$2&page=$4
    RewriteRule ^(.*)/list-([0-9]+)([-])?([0-9]+)?.html$ $1/list.php?catid=$2&page=$4
    RewriteRule ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ $1/show.php?itemid=$2&page=$3
    RewriteRule ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ $1/list.php?catid=$2&page=$3
    RewriteRule ^(.*)/([0-9]+)/([0-9]+)?([/])?$ $1/list.php?catid=$2&page=$3
    RewriteRule ^(.*)/([A-za-z0-9_-]+)-c([0-9]+)-([0-9]+).html$ $1/list.php?catid=$3&page=$4
    RewriteRule ^(.*)/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/index.php?moduleid=$2&catid=$3&itemid=$4&page=$5
    RewriteRule ^(.*)/([a-z]+)/(.*).shtml$ $1/$2/index.php?rewrite=$3
    RewriteRule ^(com)/([a-z0-9_-]+)/([a-z]+)/(.*).html$ index.php?homepage=$2&file=$3&rewrite=$4
    RewriteRule ^(com)/([a-z0-9_-]+)/([a-z]+)([/])?$ index.php?homepage=$2&file=$3
    RewriteRule ^(com)/([a-z0-9_-]+)([/])?$ index.php?homepage=$2
    RewriteRule ^(.*)/list/([0-9]+)?$ $1/list.php?catid=$2
    RewriteRule ^(.*)/tags-([A-za-z0-9]+)?([/])?$ $1/search.php?kw=$2
    

      演示地址:http://www.whwhjy.com/

  • 相关阅读:
    python 打印出水仙花数
    pycharm 2020 激活码 破解教程
    Python 封装一个函数,查找文字字符串数字英文下标
    Python 分解质因数
    python 封装一个取符串长度的函数
    Python 正整数相加其余忽略
    Python 输入字符串找(String)下标 没有返回-1
    CPU 和 GPU 的区别
    Deferred Shading,延迟渲染(提高渲染效率,减少多余光照计算)【转】
    BumpMap、NormalMap的区别
  • 原文地址:https://www.cnblogs.com/68xi/p/14271792.html
Copyright © 2011-2022 走看看