宝塔 ,帝国cms,伪静态
rewrite ^([^.]*)/listinfo-(.+?)-(.+?).html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3 last;
rewrite ^([^.]*)/showinfo-(.+?)-(.+?)-(.+?).html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4 last;
rewrite ^([^.]*)/infotype-(.+?)-(.+?).html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3 last;
rewrite ^([^.]*)/tags-(.+?)-(.+?).html$ $1/e/tags/index.php?tagname=$2&page=$3 last;
rewrite ^([^.]*)/comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?).html$ $1/e/pl/index.php?doaction=$2&classid=$3&id=$4&page=$5&myorder=$6&tempid=$7 last;
if (!-e $request_filename) {
return 404;
}
我写过的伪静态:
rewrite ^([^.]*)/([1-9][0-9]+?)/$ $1/e/action/ShowInfo.php?classid=$2 last;
rewrite ^([^.]*)/qq(.{7,})/$ $1/qq.php?vid=$2 last;
rewrite ^([^.]*)/youku(.{7,})/$ $1/youku.php?vid=$2 last;
if (!-e $request_filename) {
return 404;
}
变量$rule_0的初始值为空。当他为21表示,
rewrite ^/infotype-([0-9]+)-([0-9]+).html$ /e/action/InfoType/index.php?ttid=$1&page=$2 last; rewrite ^/zt/([a-zA-Z0-9]+)/$ /e/tags/index.php?py=$1&page=$2 last; rewrite ^/zt/([a-zA-Z0-9]+)/([0-9]).html$ /e/tags/index.php?py=$1&page=$2 last; if (!-f $request_filename){ set $rule_0 1$rule_0; } if ($request_uri !~ "^(/)(d|e|html|images|s|search|skin|t)($|/)"){ set $rule_0 2$rule_0; } if ($rule_0 = "21"){ rewrite ^/([0-9a-zA-Z-/]+)/(|index.html|index_[0-9]+.html)$ /e/action/listdocdaodafa.php?classid=$1&page=$2 last; rewrite ^/([0-9a-zA-Z-/]+)/([0-9a-zA-Z]+)([_0-9]*).html$ /e/action/showdocdaodada.php?classid=$1&id=$2&page=$3 last;