全球主机交流论坛

标题: 万能的HOSTLOC,求Nginx 转IIS   [打印本页]

作者: sujian919    时间: 2012-4-22 00:02
标题: 万能的HOSTLOC,求Nginx 转IIS  

万能的hostloc,这是Nginx的规则,求技术帝转换为IIS。
  1. rewrite ^/region-([0-9]+)\.html$ /e/search/result/?searchid=$1 last;
  2. rewrite ^/products-([0-9]+)\.html$ /e/action/ListInfo/?classid=$1;
  3. rewrite ^/company-([0-9]+).([0-9]+)\.html$ /e/action/ShowInfo.php?classid=$1&id=$2 last;
  4. rewrite ^/products-(.+?).html /e/tags/?tagname=$1 last;
  5. rewrite ^/products-([0-9]+).html /e/tags/?tagid=$1 last;
  6. rewrite ^/products-([0-9]+)-([0-9]+).html /e/tags/index.php?page=$2&tagid=$1 last;
  7. rewrite ^/products-(.+?)-([0-9]+).html /e/tags/index.php?page=$2&tagname=$1 last;
复制代码

作者: master    时间: 2012-4-22 00:03
楼下会,亲,你等着啊
作者: sujian919    时间: 2012-4-22 00:05
master 发表于 2012-4-22 00:03
楼下会,亲,你等着啊

亲,楼下是我,我不会,亲。。。。
作者: 郭郭    时间: 2012-4-22 00:05
下一个,上吧
作者: 主机猫    时间: 2012-4-22 00:05
提示: 作者被禁止或删除 内容自动屏蔽
作者: 单手摘月    时间: 2012-4-22 00:06
提示: 作者被禁止或删除 内容自动屏蔽
作者: sujian919    时间: 2012-4-22 00:09
主机猫 发表于 2012-4-22 00:05
你以为真有人每天闲着吃饭睡觉还要帮你转换这么无聊的东西吗

你自私,不代表别人也自私。
作者: 主机猫    时间: 2012-4-22 00:12
提示: 作者被禁止或删除 内容自动屏蔽
作者: sujian919    时间: 2012-4-22 00:16
主机猫 发表于 2012-4-22 00:12
真可笑,楼主所谓的大方就是别人要无偿无私帮你做事。

你这个MJJ的,,你在hostloc混了几天。。毛都还没有长齐。。。。
作者: xspoco    时间: 2012-4-22 02:00
这里大部分是 iis 转nginx的吧。。
作者: Sylar    时间: 2012-4-22 02:26
(, 下载次数: 0)
这是LZ头像的完整版吗
作者: alttcn    时间: 2012-4-22 03:17

其实规律都差不多。
作者: sujian919    时间: 2012-4-22 12:31
其他的都可以了。还差这一条:rewrite ^/products-([0-9]+)\.html$ /e/action/ListInfo/?classid=$1;
作者: nop    时间: 2012-4-22 12:35
isapi_rewrite ?
作者: 有个就好    时间: 2012-4-22 12:35
只会nginx
作者: sujian919    时间: 2012-4-22 13:10
本帖最后由 sujian919 于 2012-4-22 13:17 编辑
nop 发表于 2012-4-22 12:35
isapi_rewrite ?


嗯。是的。这条是Nginx
rewrite ^/products-([0-9]+)\.html$ /e/action/ListInfo/?classid=$1;

我修改成IIS

RewriteRule ^(.*)/products-([0-9]+)\.html$ $1/e/action/ListInfo/\?classid=$2

从ID号为4开始都能正常访问。
www.域名.com/products-4.html
www.域名.com/products-5.html
www.域名.com/products-6.html
www.域名.com/products-7.html
www.域名.com/products-8.html
........................

但ID为1、2、3的自动又变为
www.域名.com/e/action/ListInfo/?classid=1
www.域名.com/e/action/ListInfo/?classid=2
www.域名.com/e/action/ListInfo/?classid=3
不知道哪里出问题了。


作者: lixuguang.xy    时间: 2012-4-22 13:34
主机猫 发表于 2012-4-22 00:12
真可笑,楼主所谓的大方就是别人要无偿无私帮你做事。

你这个MJJ的,,你在hostloc混了几天。。毛都还没有长齐。。。。   +1
作者: douddh    时间: 2012-4-22 13:39
很激烈
作者: 查无此人    时间: 2012-4-22 13:54
提示: 作者被禁止或删除 内容自动屏蔽
作者: dstwhk    时间: 2012-4-22 13:54
楼主要理解那位主机商的心理。。。。他就是那样
作者: shineme    时间: 2012-4-22 14:33
主机猫 发表于 2012-4-22 00:05
你以为真有人每天闲着吃饭睡觉还要帮你转换这么无聊的东西吗

畜生
作者: yabuy    时间: 2012-4-23 01:14
慢慢研究吧
作者: sujian919    时间: 2012-4-23 09:52
已经弄好了,感谢各位,再次对那位自私MJJ的表示鄙视。




欢迎光临 全球主机交流论坛 (https://lilynana.eu.org/) Powered by Discuz! X3.4