AKCMS的nginx伪静态规则
一直有打算使用一个简单而不简洁的而且占用系统资源较少的cms 来做一个可定制化的站点,选来选去感觉akcms还是比较不错的,私下也搭建测试过,不过想要利用akcms做一个比较不错的站点需要有一定的基础去制做模板,一些代码微调等。由于近期事情太忙,先将nginx下对于akcms 的伪静态规则记录下,以备后面时候空了要用:
1location / {
2rewrite ^/$ /index.php last;
3rewrite ^/([a-zA-Z0-9-_/]+)/([a-zA-Z0-9-_/]+)/([a-zA-Z0-90-9]+).htm$ /article.php?id=$3 last;
4rewrite ^/([a-zA-Z0-9-_/]+)/([a-zA-Z0-90-9]+)/index.html$ /category.php?id=$2 last;
5rewrite ^/([a-zA-Z0-9-_/]+)/index.html$ /category.php?id=$1 last;
6rewrite ^/([a-zA-Z0-9-_/]+)/index.html$ /category.php?id=$1&page=$2 last;
7}
捐赠本站(Donate)
如您感觉文章有用,可扫码捐赠本站!(If the article useful, you can scan the QR code to donate))
- Author: shisekong
- Link: https://blog.361way.com/akcms-nginx-rewrite/4826.html
- License: This work is under a 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议. Kindly fulfill the requirements of the aforementioned License when adapting or creating a derivative of this work.