AKCMS的nginx伪静态规则

一直有打算使用一个简单而不简洁的而且占用系统资源较少的cms 来做一个可定制化的站点,选来选去感觉akcms还是比较不错的,私下也搭建测试过,不过想要利用akcms做一个比较不错的站点需要有一定的基础去制做模板,一些代码微调等。由于近期事情太忙,先将nginx下对于akcms 的伪静态规则记录下,以备后面时候空了要用:

location / {
rewrite ^/$ /index.php last;
rewrite ^/([a-zA-Z0-9-_/]+)/([a-zA-Z0-9-_/]+)/([a-zA-Z0-90-9]+).htm$ /article.php?id=$3 last;
rewrite ^/([a-zA-Z0-9-_/]+)/([a-zA-Z0-90-9]+)/index.html$ /category.php?id=$2 last;
rewrite ^/([a-zA-Z0-9-_/]+)/index.html$ /category.php?id=$1 last;
rewrite ^/([a-zA-Z0-9-_/]+)/index.html$ /category.php?id=$1&page=$2 last;
}

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注