当前位置:首页 > 网络技术 > 正文内容

dir35分类目录Nginx伪静态规则

西风2年前 (2023-07-05)网络技术1244

dir35分类目录Nginx伪静态规则   

rewrite ^/(index|webdir|weblink|article|category|update|archives|top|feedback|link|rssfeed|sitemap)(/?)$ /index.php?mod=$1;

rewrite ^/update/(\d+)\.html$ /index.php?mod=update&days=$1;
rewrite ^/update/(\d+)-(\d+)\.html$ /index.php?mod=update&days=$1&page=$2;
rewrite ^/archives/(\d+)\.html$ /index.php?mod=archives&date=$1;
rewrite ^/archives/(\d+)-(\d+)\.html$ /index.php?mod=archives&date=$1&page=$2;
rewrite ^/search/(name|url|tags|intro|br|pr|art)/(.+)-(\d+)\.html$ /index.php?mod=search&type=$1&query=$2&page=$3;
rewrite ^/search/(name|url|tags|intro|br|pr|art)/(.+)\.html$ /index.php?mod=search&type=$1&query=$2;
rewrite ^/(br|pr)/(.+)-(\d+)\.html$ /index.php?mod=search&type=$1&query=$2&page=$3;
rewrite ^/(br|pr)/(.+)\.html$ /index.php?mod=search&type=$1&query=$2;
rewrite ^/view/(\d+)\.html$ /index.php?mod=siteinfo&wid=$1;
rewrite ^/siteinfo/(\d+)\.html$ /index.php?mod=siteinfo&wid=$1;
rewrite ^/siteinfo-(\d+)\.html$ /index.php?mod=siteinfo&wid=$1;
rewrite ^/site/(\d+)-(.+)(/?)\.html$ /index.php?mod=siteinfo&wid=$1;
rewrite ^/artinfo/(\d+)\.html$ /index.php?mod=artinfo&aid=$1;
rewrite ^/linkinfo/(\d+)\.html$ /index.php?mod=linkinfo&lid=$1;
rewrite ^/diypage/(\d+)\.html$ /index.php?mod=diypage&pid=$1;
rewrite ^/rssfeed/(\d+)\.html$ /index.php?mod=rssfeed&cid=$1;
rewrite ^/sitemap/(\d+)\.html$ /index.php?mod=sitemap&cid=$1;
rewrite ^/webdir/(.+)/(\d+)\.html$ /index.php?mod=webdir&cid=$2;
rewrite ^/webdir/(.+)/(\d+)-(\d+)\.html$ /index.php?mod=webdir&cid=$2&page=$3;
rewrite ^/webdir/(.+)/(\d+)-(.+)-(\d+)\.html$ /index.php?mod=webdir&cid=$2&sort=$3&page=$4;
rewrite ^/weblink/(.+)/(\d+)\.html$ /index.php?mod=weblink&cid=$2;
rewrite ^/weblink/(.+)/(\d+)-(\d+)\.html$ /index.php?mod=weblink&cid=$2&page=$3;
rewrite ^/weblink/(.+)/(\d+)-(.+)-(\d+)\.html$ /index.php?mod=weblink&cid=$2&sort=$3&page=$4;
rewrite ^/article/(.+)/(\d+)\.html$ /index.php?mod=article&cid=$2;
rewrite ^/article/(.+)/(\d+)-(\d+)\.html$ /index.php?mod=article&cid=$2&page=$3;
rewrite ^/rssfeed/(.+)/(\d+)\.html$ /index.php?mod=rssfeed&cid=$2;
rewrite ^/rssfeed/(.+)/(\d+)-(\d+)\.html$ /index.php?mod=rssfeed&cid=$2&page=$3;


扫描二维码推送至手机访问。

版权声明:本文转载自网络,如有侵权请与本站联系。

本文链接:https://blog.cnod.net/post/15.html

分享给朋友:

相关文章

怎样给网卡的IP地址设置别名

命令如下,适用于Linux和Mac# 设置IP别名ifconfig en1 alias 192.168.2.1 netmask 255.255.255.0 # 删除IP...

为openwrt里的docker扩容教程

为openwrt里的docker扩容教程

我这边的话是使用的eSir的高大全openwrt固件作为旁路由,eSir的固件里有自带的docker但是空间只有几百兆,有时候我们要折腾一些东西的话是不够的,所以在我们的空间还有剩余的时候可以给他扩容出来,方便使用。我的硬盘够用所以我给他3...

随机头像 API 搭建

选择安装位置一般安装在网站根目录初始化文件在目录下创建 api.php 文件,随后创建一个名为 img 的文件夹,将图片存放进 img 文件夹下<?php $img_array = glob('img/*...

openwrt 安装 sftp-server

OpenWrt系统通常默认安装了Dropbear SSH服务器,但是不包含sftp-server组件。如果您需要在OpenWrt系统中使用sftp服务,可以按照以下步骤安装:连接到您的OpenWrt设备,通过SSH登录到系统中。更新软件包列...

openwrt 获取内核版本

要获取在OpenWrt上运行的内核版本,您可以使用以下命令:uname -r该命令将返回当前内核版本的信息。在OpenWrt系统中,内核版本信息通常以类似于4.14.221的形式呈现。另外,您也可以通过以下命令来查看系统完整的内核...

群晖搭建Pushdeer消息推送

群晖搭建Pushdeer消息推送

前言最近家里搞了些微服务,需要一些消息推送,比如 ha 的 设备推送 等,目前网上有的推送感觉一是不太稳定 / 二氪金,所以既然自己有服务,就可以搭建,所以一路摸索,最终实现。Pushdeer官方地址:http://ww...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。