nginx环境:
# 首页、分类浏览、数据归档、最近更新、排行榜、意见反馈
if ($uri ~ "^/(index|webdir|weblink|article|category|update|archives|top|feedback|link|rssfeed|sitemap)(.html|/?)") {
rewrite ^/(index|webdir|weblink|article|category|update|archives|top|feedback|link|rssfeed|sitemap)(.html|/?) /index.php?mod=$1 last;
}
# 最近更新和数据归档
if ($uri ~ "^/(update|archives)(-|/)(d+)(-|/)(d+)(.html|/?)") {
rewrite ^/(update|archives)(-|/)(d+)(-|/)(d+)(.html|/?) /index.php?mod=$1&date=$3&page=$5 last;
}
# 站内搜索
if ($uri ~ "^/search(-|/)(name|url|tags|baidu|intro|br|pr|sr)(-|/)(.*)(-|/)?(d+)?(.html|/?)") {
rewrite ^/search(-|/)(name|url|tags|baidu|intro|br|pr|sr)(-|/)(.*)(-|/)?(d+)?(.html|/?) /index.php?mod=search&type=$2&query=$4&page=$6 last;
}
# 站点详细、文章详细、链接详细、单页
if ($uri ~ "^/(siteinfo|artinfo|linkinfo|diypage)(-|/)(d+)(.html|/?)") {
rewrite ^/(siteinfo|artinfo|linkinfo|diypage)(-|/)(d+)(.html|/?) /index.php?mod=$1&wid=$3 last;
}
# RSS
if ($uri ~ "^/rssfeed(-|/)(.+)(-|/)?(d+)?(.html|/?)") {
rewrite ^/rssfeed(-|/)(.+)(-|/)?(d+)?(.html|/?) /index.php?mod=rssfeed&type=$2&cid=$4 last;
}
# SiteMap
if ($uri ~ "^/sitemap(-|/)(.+)(.html|/?)") {
rewrite ^/sitemap(-|/)(.+)(.html|/?) /index.php?mod=sitemap&cid=$2 last;
}
# 分类目录
if ($uri ~ "^/(webdir|article)(-|/)(.+)(-|/)(d+)(-|/)(d+)(.html|/?)") {
rewrite ^/(webdir|article)(-|/)(.+)(-|/)(d+)(-|/)(d+)(.html|/?) /index.php?mod=$1&cid=$5&page=$7 last;
}
# PHP 处理
if (!-e $request_filename) {
rewrite ^ /index.php last;
}
Apache环境:
RewriteEngine On
# 首页、分类浏览、数据归档、最近更新、排行榜、意见反馈
RewriteRule ^(index|webdir|weblink|article|category|update|archives|top|feedback|link|rssfeed|sitemap)(.html|/?)$ index.php?mod=$1 [L]
# 最近更新
RewriteRule ^(update|archives)(-|/)(d+)(-|/)(d+)(.html|/?)$ index.php?mod=$1&date=$3&page=$5 [L]
# 站内搜索
RewriteRule ^search(-|/)(name|url|tags|baidu|intro|br|pr|sr)(-|/)(.*)(-|/)?(d+)?(.html|/?)$ index.php?mod=search&type=$2&query=$4&page=$6 [L]
# 站点详细、文章详细、链接详细、单页
RewriteRule ^(siteinfo|artinfo|linkinfo|diypage)(-|/)(d+)(.html|/?)$ index.php?mod=$1&wid=$3 [L]
# RSS
RewriteRule ^rssfeed(-|/)(.+)(-|/)?(d+)?(.html|/?)$ index.php?mod=rssfeed&type=$2&cid=$4 [L]
# SiteMap
RewriteRule ^sitemap(-|/)(.+)(.html|/?)$ index.php?mod=sitemap&cid=$2 [L]
# 分类目录
RewriteRule ^(webdir|article)(-|/)(.+)(-|/)(d+)(-|/)(d+)(.html|/?)$ index.php?mod=$1&cid=$5&page=$7 [L]
IIS环境:
以上伪静态需在 35分类目录: 35分类目录【优站】适配 php7.0 分享版 这个版本适配,别的旧版35分类目录不适配
修复伪静态部分问题,让其适配程序
来源:本站原创 浏览:456次 时间:2025-04-02
简介:修复伪静态部分问题,让其适配程序
相关推荐
相关站点
© 版权声明
💬 文章评论
正在加载评论统计...
发表评论
正在加载评论...


AI工具导航站 - 发现优质实用AI工具网站
洛谷
LearnKu 终身编程者的知识社区
搜狗搜索
屏蔽iphone系统自动升级方法
Krill AI