vps上安装破解版whmcs用于测试学习,可能也有朋友跟我一样在nginx下用,就会碰到伪静态的问题,默认whmcs只提供了apache的伪静态,所以在nginx下用就需要自己写伪静态了。
代码如下:
location / { # Announcements rewrite ^/announcements/([0-9]+)/[a-zA-Z0-9_-]+.html$ /announcements.php?id=$1 last; rewrite ^/announcements$ /announcements.php last; # Downloads rewrite ^/downloads/([0-9]+)/([^/]*)$ /downloads.php?action=displaycat&catid=$1 last; rewrite ^/downloads$ /downloads.php last; # Knowledgebase rewrite ^/knowledgebase/([0-9]+)/[a-zA-Z0-9_-]+.html$ /knowledgebase.php?action=displayarticle&id=$1 last; rewrite ^/knowledgebase/([0-9]+)/([^/]*)$ /knowledgebase.php?action=displaycat&catid=$1 last; rewrite ^/knowledgebase$ /knowledgebase.php last; }
最新评论