vpsVPS口碑网

WHMCS 使用教程 - 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>
宝塔面板的话直接放到伪静态里边就行了

郑重声明:本站部分文章来自网络,如有侵权请联系站长。【加入VPS口碑QQ群聊

宝塔