宝塔php伪静态规则,宝塔BT面板伪静态规则大全汇总
宝塔BT面板自带近30种网站程序的伪静态规则,环境吧分享宝塔面板下各个源码程序的伪静态规则大全:
宝塔伪静态规则程序列表
宝塔伪静态规则程序源码包括:WordPress、帝国EmpireCMS、dedecms、discuz、drupal、ecshop、laravel5、phpcms、phpwind、shopex、thinkphp、typecho、weengine、zblog、dabr、dbshop、emlog、maccms、mvc、niushop、sablog、seacms等程序源码的伪静态规则,大家直接在后台选择即可。
宝塔伪静态规则大全
环境吧分享主流的程序伪静态规则,以Nginx Web服务器为例,想要Apache的用户可以自行转换。
WordPress伪静态规则
location / {
index index.html index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
location/{
indexindex.htmlindex.php;
if(-f$request_filename/index.html){
rewrite(.*)$1/index.htmlbreak;
}
if(-f$request_filename/index.php){
rewrite(.*)$1/index.php;
}
if(!-f$request_filename){
rewrite(.*)/index.php;
}
}
rewrite/wp-admin$$scheme://$host$uri/ permanent;
thinkphp伪静态规则
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}
1
2
3
4
5
location/{
if(!-e$request_filename){
rewrite^(.*)$/index.php?s=$1last;break;
}
}
dedecms伪静态规则
location / {
rewrite "^/list-([0-9]+)\.html$" /plus/list.php?tid=$1 last;
rewrite "^/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$" /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 last;
rewrite "^/view-([0-9]+)-1\.html$" /plus/view.php?arcID=$1 last;
rewrite "^/view-([0-9]+)-([0-9]+)\.html$" /plus/view.php?aid=$1&pageno=$2 last;
rewrite "^/tags.html$" /tags.php last;
rewrite "^/tag-([0-9]+)-([0-9]+)\.html$" /tags.php?/$1/$2/ last;
break;
}
1
2
3
4
5
6
7
8
9
location/{
rewrite"^/list-([0-9]+)\.html$"/plus/list.php?tid=$1last;
rewrite"^/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$"/plus/list.php?tid=$1&totalresult=$2&PageNo=$3last;
rewrite"^/view-([0-9]+)-1\.html$"/plus/view.php?arcID=$1last;
rewrite"^/view-([0-9]+)-([0-9]+)\.html$"/plus/view.php?aid=$1&pageno=$2last;
rewrite"^/tags.html$"/tags.phplast;
rewrite"^/tag-([0-9]+)-([0-9]+)\.html$"/tags.php?/$1/$2/last;
break;
}
discuz伪静态规则
location / {
rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;
rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;
rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;
}
1
2
3
4
5
6
7
location/{
rewrite^/archiver/((fid|tid)-[\w\-]+\.html)$/archiver/index.php?$1last;
rewrite^/forum-([0-9]+)-([0-9]+)\.html$/forumdisplay.php?fid=$1&page=$2last;
rewrite^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$/viewthread.php?tid=$1&extra=page%3D$3&page=$2last;
rewrite^/space-(username|uid)-(.+)\.html$/space.php?$1=$2last;
rewrite^/tag-(.+)\.html$/tag.php?name=$1last;
}
帝国EmpireCMS伪静态规则
rewrite ^([^\.]*)/listinfo-(.+?)-(.+?)\.html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3 last;
rewrite ^([^\.]*)/showinfo-(.+?)-(.+?)-(.+?)\.html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4 last;
rewrite ^([^\.]*)/infotype-(.+?)-(.+?)\.html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3 last;
rewrite ^([^\.]*)/tags-(.+?)-(.+?)\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last;
rewrite ^([^\.]*)/comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)\.html$ $1/e/pl/index\.php\?doaction=$2&classid=$3&id=$4&page=$5&myorder=$6&tempid=$7 last;
if (!-e $request_filename) {
return 404;
}
1
2
3
4
5
6
7
8
rewrite^([^\.]*)/listinfo-(.+?)-(.+?)\.html$$1/e/action/ListInfo/index.php?classid=$2&page=$3last;
rewrite^([^\.]*)/showinfo-(.+?)-(.+?)-(.+?)\.html$$1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4last;
rewrite^([^\.]*)/infotype-(.+?)-(.+?)\.html$$1/e/action/InfoType/index.php?ttid=$2&page=$3last;
rewrite^([^\.]*)/tags-(.+?)-(.+?)\.html$$1/e/tags/index.php?tagname=$2&page=$3last;
rewrite^([^\.]*)/comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)\.html$$1/e/pl/index\.php\?doaction=$2&classid=$3&id=$4&page=$5&myorder=$6&tempid=$7last;
if(!-e$request_filename){
return404;
}
ECShop伪静态规则
if (!-e $request_filename)
{
rewrite "^/index\.html" /index.php last;
rewrite "^/category$" /index.php last;
rewrite "^/feed-c([0-9]+)\.xml$" /feed.php?cat=$1 last;
rewrite "^/feed-b([0-9]+)\.xml$" /feed.php?brand=$1 last;
rewrite "^/feed\.xml$" /feed.php last;
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3 last;
rewrite "^/category-([0-9]+)-b([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2 last;
rewrite "^/category-([0-9]+)(.*)\.html$" /category.php?id=$1 last;
rewrite "^/goods-([0-9]+)(.*)\.html" /goods.php?id=$1 last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)(.*)\.html$" /article_cat.php?id=$1&page=$2 last;
rewrite "^/article_cat-([0-9]+)(.*)\.html$" /article_cat.php?id=$1 last;
rewrite "^/article-([0-9]+)(.*)\.html$" /article.php?id=$1 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html" /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2&page=$3 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2 last;
rewrite "^/brand-([0-9]+)(.*)\.html" /brand.php?id=$1 last;
rewrite "^/tag-(.*)\.html" /search.php?keywords=$1 last;
rewrite "^/snatch-([0-9]+)\.html$" /snatch.php?id=$1 last;
rewrite "^/group_buy-([0-9]+)\.html$" /group_buy.php?act=view&id=$1 last;
rewrite "^/auction-([0-9]+)\.html$" /auction.php?act=view&id=$1 last;
rewrite "^/exchange-id([0-9]+)(.*)\.html$" /exchange.php?id=$1&act=view last;
rewrite "^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last;
rewrite ^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/exchange-([0-9]+)-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2 last;
rewrite "^/exchange-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1 last;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
if(!-e$request_filename)
{
rewrite"^/index\.html"/index.phplast;
rewrite"^/category$"/index.phplast;
rewrite"^/feed-c([0-9]+)\.xml$"/feed.php?cat=$1last;
rewrite"^/feed-b([0-9]+)\.xml$"/feed.php?brand=$1last;
rewrite"^/feed\.xml$"/feed.phplast;
rewrite"^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$"/category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8last;
rewrite"^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$"/category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5last;
rewrite"^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$"/category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5last;
rewrite"^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$"/category.php?id=$1&brand=$2&page=$3last;
rewrite"^/category-([0-9]+)-b([0-9]+)(.*)\.html$"/category.php?id=$1&brand=$2last;
rewrite"^/category-([0-9]+)(.*)\.html$"/category.php?id=$1last;
rewrite"^/goods-([0-9]+)(.*)\.html"/goods.php?id=$1last;
rewrite"^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$"/article_cat.php?id=$1&page=$2&sort=$3&order=$4last;
rewrite"^/article_cat-([0-9]+)-([0-9]+)(.*)\.html$"/article_cat.php?id=$1&page=$2last;
rewrite"^/article_cat-([0-9]+)(.*)\.html$"/article_cat.php?id=$1last;
rewrite"^/article-([0-9]+)(.*)\.html$"/article.php?id=$1last;
rewrite"^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html"/brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5last;
rewrite"^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html"/brand.php?id=$1&cat=$2&page=$3last;
rewrite"^/brand-([0-9]+)-c([0-9]+)(.*)\.html"/brand.php?id=$1&cat=$2last;
rewrite"^/brand-([0-9]+)(.*)\.html"/brand.php?id=$1last;
rewrite"^/tag-(.*)\.html"/search.php?keywords=$1last;
rewrite"^/snatch-([0-9]+)\.html$"/snatch.php?id=$1last;
rewrite"^/group_buy-([0-9]+)\.html$"/group_buy.php?act=view&id=$1last;
rewrite"^/auction-([0-9]+)\.html$"/auction.php?act=view&id=$1last;
rewrite"^/exchange-id([0-9]+)(.*)\.html$"/exchange.php?id=$1&act=viewlast;
rewrite"^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$"/exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6last;
rewrite^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/exchange-([0-9]+)-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2 last;
rewrite "^/exchange-([0-9]+)(.*)\.html$"/exchange.php?cat_id=$1last;
}
laravel5伪静态规则
location / {
try_files $uri $uri/ /index.php$is_args$query_string;
}
1
2
3
location/{
try_files$uri$uri//index.php$is_args$query_string;
}
phpcms伪静态规则
location / {
###以下为PHPCMS 伪静态化rewrite法则
rewrite ^(.*)show-([0-9]+)-([0-9]+)\.html$ $1/show.php?itemid=$2&page=$3;
rewrite ^(.*)list-([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$2&page=$3;
rewrite ^(.*)show-([0-9]+)\.html$ $1/show.php?specialid=$2;
####以下为PHPWind 伪静态化rewrite法则
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last;
}
1
2
3
4
5
6
7
8
9
location/{
###以下为PHPCMS 伪静态化rewrite法则
rewrite^(.*)show-([0-9]+)-([0-9]+)\.html$$1/show.php?itemid=$2&page=$3;
rewrite^(.*)list-([0-9]+)-([0-9]+)\.html$$1/list.php?catid=$2&page=$3;
rewrite^(.*)show-([0-9]+)\.html$$1/show.php?specialid=$2;
####以下为PHPWind 伪静态化rewrite法则
rewrite^(.*)-htm-(.*)$$1.php?$2last;
rewrite^(.*)/simple/([a-z0-9\_]+\.html)$$1/simple/index.php?$2last;
}
PHPwind伪静态规则
location / {
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last;
}
1
2
3
4
location/{
rewrite^(.*)-htm-(.*)$$1.php?$2last;
rewrite^(.*)/simple/([a-z0-9\_]+\.html)$$1/simple/index.php?$2last;
}
shopex伪静态规则
location / {
if (!-e $request_filename) {
rewrite ^/(.+\.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$1 last;
}
}
1
2
3
4
5
location/{
if(!-e$request_filename){
rewrite^/(.+\.(html|xml|json|htm|php|jsp|asp|shtml))$/index.php?$1last;
}
}
typecho伪静态规则
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
1
2
3
if(!-e$request_filename){
rewrite^(.*)$/index.php$1last;
}
typecho2伪静态规则
location /typecho/ {
if (!-e $request_filename) {
rewrite ^(.*)$ /typecho/index.php$1 last;
}
}
1
2
3
4
5
location/typecho/{
if(!-e$request_filename){
rewrite^(.*)$/typecho/index.php$1last;
}
}
weengine伪静态规则
fastcgi_ignore_client_abort on;
proxy_ignore_client_abort on;
rewrite ^/(data|attachment)/.+\.php$ /404.html last;
location ~ \.htaccess$ {
deny all;
}
1
2
3
4
5
6
fastcgi_ignore_client_aborton;
proxy_ignore_client_aborton;
rewrite^/(data|attachment)/.+\.php$/404.htmllast;
location~\.htaccess${
denyall;
}
zblog伪静态规则
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
1
2
3
4
5
6
7
8
9
if(-f$request_filename/index.html){
rewrite(.*)$1/index.htmlbreak;
}
if(-f$request_filename/index.php){
rewrite(.*)$1/index.php;
}
if(!-f$request_filename){
rewrite(.*)/index.php;
}
根据自己的网站程序,复制对应的伪静态规则到宝塔面板后台粘贴即可。关于宝塔面板伪静态设置可以参考:宝塔面板网站伪静态设置方法
宝塔php伪静态规则,宝塔BT面板伪静态规则大全汇总相关推荐
- 阿里云ECS服务器安装宝塔BT面板图文教程
下面稍微介绍一下如何使用阿里云服务器安装宝塔面板. 概述 如果还有不了解宝塔面板怎么使用的小伙伴,可以看下我总结的系列教程,保证从新手变老鸟: [宝塔面板精选教程汇总] 宝塔面板教程(1)基于云服务器 ...
- 宝塔BT面板专业版(付费)和免费版有什么区别?
宝塔Linux面板提供免费版和专业版(付费),宝塔专业版和免费版有什么区别?新手站长网分享宝塔专业版和免费版功能对比: 宝塔面板专业版和免费版区别 宝塔Linux专业版在免费版所有功能的基础上,额外提 ...
- 宝塔面板 - BT面板 Linux Centos 命令集
文章目录 宝塔面板 - BT面板 Linux Centos 命令集 1.面板安装命令 2.面板管理命令 1.基本管理 2.端口管理 3.面板管理 4.日志相关 5.mysql 改密 3.文件所在位置 ...
- 宝塔php并发500什么意思,宝塔bt面板服务器设置调整PHP最大并发性能优化设置方法方案...
这篇文章主要为大家详细介绍了宝塔bt面板服务器设置调整PHP最大并发性能优化设置方法方案,具有一定的参考价值,感兴趣的小伙伴们可以参考一下,有需要的朋友可以收藏方便以后借鉴. 今天要给大家介绍的是宝塔 ...
- BT 面板控制命令 宝塔 Linux 常用命令收集整理
文章目录 BT 面板控制命令 宝塔 Linux 常用命令收集整理 1. 安装命令 2.卸载命令 3.显示 bt 命令行操作面板 4.忘记面板密码如何修改 5.对于 bt 管理的软件的管理 BT 面板控 ...
- 宝塔BT面板上行速度和下行速度代表什么?
宝塔面板安装好后,首页会显示网络流量,网络流量动态实时显示接口流量数据,那么上行速度和下行速度什么意思?代表什么方向的流量? 上行速度和下行速度解释 宝塔BT面板上行速度和下行速度 上行速度: 代表服 ...
- 宝塔linux面板安装使用教程汇总贴(常见问题)
遇到问题?在去找解决方法之前,请先尝试以下两步: 1.做快照然后将面板更新到最新版 2.如果已经是最新版,请在首页修复面板 新手安装使用教程 宝塔新手入门视频 BT-Panel Linux自动磁盘挂载 ...
- 宝塔Linux面板操作命令使用大全 – 宝塔面板
安装宝塔 Centos安装脚本 yum install -y wget && wget -O install.sh http://download.bt.cn/install/inst ...
- 帝国cms linux伪静态规则,帝国cms7.2伪静态规则怎么写
一.在linux主机下实现伪静态 确认虚拟主机是否支持rewrite伪静态.htaccess文件.添加.htaccess 文件,把htaccess 文件放在网站根目录. 二.在win主机下实现伪静态 ...
- php 伪静态规则,在线将Apache Rewrite Rules伪静态规则转换为Nginx Rewrite伪静态规则...
一般php的开发者本地使用的都是使用apache服务器,使用伪静态的时候每次都需要转换成nginx rewrite规则,于是做了个在线将Apache htaccess Rewrite伪静态规则自动转换 ...
最新文章
- android-----带你一步一步优化ListView(一)
- tensorflow随笔-tf.while_loop
- 黄聪:CodeSmith和PowerDesigner的使用安装和数据库创建(原创系列教程)
- 计算机操作系统稳定性的因素有哪些,计算机操作系统期末重点复习汇编.docx
- 国科大高级人工智能3-DNN(BM/RBM/DBN/DBM)
- 二元置信椭圆r语言_r语言二元期权barrier option实现案例
- 推动半导体产业发展,华微电子CCT MOS产品发布
- 任务驱动在计算机教学中的应用,浅谈任务驱动法在《计算机应用基础》教学中的应用_优秀论文...
- 数据算法之折半查找(binSearch)的Java实现
- 在线sitemap链接提取工具
- java反射对实体类取值和赋值,可以写成通过实体类获取其他元素的数据,很方便哦~~~...
- kafkaStream执行过程中出现TimeoutException异常退出
- i219v微星 驱动_intel英特尔网卡驱动下载-intel英特尔i217/i218/i219系列网卡驱动电脑版 - 极光下载站...
- coreldraw的线条怎么变成圆头_CDR将照片变线条的三种方法
- 彻底弄懂GMT、UTC、时区和夏令时
- 支持tcam的服务器,一种支持TCAM规则更新和压缩方法.doc
- 上财计算机专业全国排名,2021软科财经类大学排名,上海财经遥遥领先,东财仅排第六...
- (附源码)springboot电影选座订票app 毕业设计 011439
- Expected one result (or null) to be returned by selectOne(), but found: 4
- Alertmanager 报警规则
热门文章
- Android,iOS应用适配IPv6之网络配置
- MindManager2021补丁注册码激活码生成器
- android开发日历,Android日历开发详解
- php制作奥运五环颜色代表的洲,php趣味 - php 奥运五环
- activex服务器与com组件,COM和ActiveX控件设计.ppt
- Codeforces Beta Round #94 (Div. 1 Only)A. Statues
- HRBUST - 1653
- python太阳代码_用86行Python代码模拟太阳系
- 金三银四跳槽季,教你这几招提高面试成功率
- 微信公众号菜单模板设置