主机参考: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;
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> 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>
若已安装宝塔面板,直接放到伪静态里面即可
这几篇文章你可能也喜欢:
- Phpcms全站伪静态设置(网站伪静态设置)
- phpcms手机站首页如何设置伪静态?(discuz手机伪静态)
- 便宜国外vps论坛_Whois Search 优化伪静态 添加IDN支持
- 便宜国外vps论坛_用了这款域名报价模板,域名卖不出过来打我也没用
- 便宜国外vps论坛_求助Nginx 设置分流后,不能启动
本文由主机参考刊发,转载请注明:WHMCS自学教程,Nginx伪静态规则,Apache伪静态规则,宝塔面板可直接使用,WHMCS Study https://zhujicankao.com/5771.html
评论前必须登录!
注册