WHMCS自学教程,Nginx伪静态规则,Apache伪静态规则,宝塔面板可直接使用,WHMCS Study云服务器怎么样?云服务器值不值得购买?云服务器好不好?
Nginx伪静态规则
# 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;
RewriteEngine On # 公告伪静态 RewriteRule ^announcements/([0–9]+)/[a-z0-9_-]+\.html$ ./announcements.php?id=$1 [L,NC] RewriteRule ^announcements$ ./announcements.php [L,NC] # 下载伪静态 RewriteRule ^downloads/([0–9]+)/([^/]*)$ ./downloads.php?action=displaycat&catid=$1 [L,NC] RewriteRule ^downloads$ ./downloads.php [L,NC] # 知识库伪静态 RewriteRule ^knowledgebase/([0–9]+)/[a-z0-9_-]+\.html$ ./knowledgebase.php?action=displayarticle&id=$1 [L,NC] RewriteRule ^knowledgebase/([0–9]+)/([^/]*)$ ./knowledgebase.php?action=displaycat&catid=$1 [L,NC] RewriteRule ^knowledgebase$ ./knowledgebase.php [L,NC] # 防止目录暴露禁止TPL INC CFG文件被下载 Options -Indexes <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> <Files ~ “\.(tpl|inc|cfg)$”> order deny,allow deny from all </files>
若已安装宝塔面板,直接放到伪静态里面即可
来源链接:https://www.vpssz.com/
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。
郑重声明:VPS主机评测仅提供资料收集及VPS云主机信息推介,不提供任何VPS云主机及代购业务!