主机测评 - 翘课网 - 国外VPS,国外服务器,主机,测评及优惠码

[IDC教程]WHMCS伪静态规则

QioKe 347 0

特别声明:如未注明出处均为翘课网原创、如有侵权请联系我们删除。任何商家都有跑路的可能!请备份好自己的数据!翘课网不会为任何商家做担保!

宝塔面板直接放到伪静态里边就行了。

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;

Apache伪静态规则
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>

评论列表 (已有0条评论)

消灭零回复

发表评论 (已有0条评论)