VPS参考测评推荐
专注分享VPS主机优惠信息
衡天云优惠活动
华纳云优惠活动
荫云优惠活动

WHMCS自学教程,Nginx伪静态规则,Apache伪静态规则,宝塔面板可直接使用,WHMCS Study

主机参考:VPS测评参考推荐/专注分享VPS服务器优惠信息!若您是商家可以在本站进行投稿,查看详情!此外我们还提供软文收录、PayPal代付、广告赞助等服务,查看详情!
我们发布的部分优惠活动文章可能存在时效性,购买时建议在本站搜索商家名称可查看相关文章充分了解该商家!若非中文页面可使用Edge浏览器同步翻译!PayPal代付/收录合作

文章目录

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=displaycatcatid=$1 last;
rewrite ^/downloads$ /downloads.php last;

# Knowledgebase
rewrite ^/knowledgebase/([0-9]+)/[a-zA-Z0-9_-]+.html$ /knowledgebase.php?action=displayarticleid=$1 last;
rewrite ^/knowledgebase/([0-9]+)/([^/]*)$ /knowledgebase.php?action=displaycatcatid=$1 last;
rewrite ^/knowledgebase$ /knowledgebase.php last;

若已安装宝塔面板,直接放到伪静态里面即可

WHMCS自学教程,Nginx伪静态规则,Apache伪静态规则,宝塔面板可直接使用,WHMCS Study-主机参考

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=displaycatcatid=$1 [L,NC]
RewriteRule ^downloads$ ./downloads.php [L,NC]
# 知识库伪静态
RewriteRule ^knowledgebase/([0–9]+)/[a-z0-9_-]+\.html$ ./knowledgebase.php?action=displayarticleid=$1 [L,NC]
RewriteRule ^knowledgebase/([0–9]+)/([^/]*)$ ./knowledgebase.php?action=displaycatcatid=$1 [L,NC]
RewriteRule ^knowledgebase$ ./knowledgebase.php [L,NC]
# 防止目录暴露禁止TPL INC CFG文件被下载
Options -Indexes
<Limit GET POST&gt;
order deny,allow
deny from all
allow from all
</Limit&gt;
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
<Files ~ “\.(tpl|inc|cfg)$”>
order deny,allow
deny from all
</files>

若已安装宝塔面板,直接放到伪静态里面即可

 

这几篇文章你可能也喜欢:

本文由主机参考刊发,转载请注明:WHMCS自学教程,Nginx伪静态规则,Apache伪静态规则,宝塔面板可直接使用,WHMCS Study https://zhujicankao.com/5771.html

【腾讯云】领8888元采购礼包,抢爆款云服务器 每月 9元起,个人开发者加享折上折!
打赏
转载请注明原文链接:主机参考 » WHMCS自学教程,Nginx伪静态规则,Apache伪静态规则,宝塔面板可直接使用,WHMCS Study
主机参考仅做资料收集,不对商家任何信息及交易做信用担保,购买前请注意风险,有交易纠纷请自行解决!请查阅:特别声明

评论 抢沙发

评论前必须登录!