把APACHE的伪静态规则转为NGINX的

RewriteEngineOnRewriteBase/RewriteRule^(.*)list/(.+)-([0-9]+)\.html$$1/list\.php\?id=... RewriteEngine On
RewriteBase /

RewriteRule ^(.*)list/(.+)-([0-9]+)\.html$ $1/list\.php\?id=$2&page=$3
RewriteRule ^(.*)list/(.+)\.html$ $1/list\.php\?id=$2

RewriteRule ^(.*)listb/(.+)-([0-9]+)\.html$ $1/listb\.php\?id=$2&page=$3
RewriteRule ^(.*)listb/(.+)\.html$ $1/listb\.php\?id=$2

RewriteRule ^(.*)zhishi/(.+)\.html$ $1/zlyzhslk\.php\?id=$2

RewriteRule ^(.*)search/(.+)-([0-9]+)\.html$ $1/search\.php\?key=$2&page=$3
RewriteRule ^(.*)search/([^-]+)\.html$ $1/search\.php\?key=$2

RewriteRule ^(.*)search\.html\?key=(.*)$ $1/search\.php\?key=$2
RewriteRule ^(.*)searchs\.html\?key=(.*)$ $1/search\.php\?key=$2

RewriteRule ^(.*)tag-([^-]+)/(.*)-([0-9]+)\.html$ $1/tag\.php\?id=$2&key=$3&page=$4
RewriteRule ^(.*)tag-([^-]+)/(.*)\.html$ $1/tag\.php\?id=$2&key=$3

RewriteRule ^(.*)tagb-([^-]+)/(.*)-([0-9]+)\.html$ $1/tagb\.php\?id=$2&key=$3&page=$4
RewriteRule ^(.*)tagb-([^-]+)/(.*)\.html$ $1/tagb\.php\?id=$2&key=$3

请转成完整的 NGINX 伪静态规则代码 谢谢 ~
展开
 我来答
newphp
2010-08-13 · TA获得超过176个赞
知道小有建树答主
回答量:100
采纳率:100%
帮助的人:157万
展开全部
rewrite ^(.*)list/(.+)-([0-9]+)\.html$ $1/list\.php\?id=$2&page=$3 last;
rewrite ^(.*)list/(.+)\.html$ $1/list\.php\?id=$2 last;

rewrite ^(.*)listb/(.+)-([0-9]+)\.html$ $1/listb\.php\?id=$2&page=$3 last;
rewrite ^(.*)listb/(.+)\.html$ $1/listb\.php\?id=$2 last;

rewrite ^(.*)zhishi/(.+)\.html$ $1/zlyzhslk\.php\?id=$2 last;

rewrite ^(.*)search/(.+)-([0-9]+)\.html$ $1/search\.php\?key=$2&page=$3 last;
rewrite ^(.*)search/([^-]+)\.html$ $1/search\.php\?key=$2 last;

rewrite ^(.*)search\.html\?key=(.*)$ $1/search\.php\?key=$2 last;
rewrite ^(.*)searchs\.html\?key=(.*)$ $1/search\.php\?key=$2 last;

rewrite ^(.*)tag-([^-]+)/(.*)-([0-9]+)\.html$ $1/tag\.php\?id=$2&key=$3&page=$4 last;
rewrite ^(.*)tag-([^-]+)/(.*)\.html$ $1/tag\.php\?id=$2&key=$3 last;

rewrite ^(.*)tagb-([^-]+)/(.*)-([0-9]+)\.html$ $1/tagb\.php\?id=$2&key=$3&page=$4 last;
rewrite ^(.*)tagb-([^-]+)/(.*)\.html$ $1/tagb\.php\?id=$2&key=$3 last;
Storm代理
2023-07-25 广告
StormProxies是一家提供动态代理服务器服务的企业,旨在帮助用户更好地管理网络访问和安全。以下是一些关于StormProxies的IP动态代理服务的特点:1. 高匿名性:StormProxies的动态代理服务器具有高匿名性,可以有效... 点击进入详情页
本回答由Storm代理提供
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式