源码论坛,商业源码下载,尽在锦尚中国商业源码论坛

标题: 求助:安乐业房产程序在nginx下的伪静态规则 [打印本页]

作者: huyong83    时间: 2010-2-18 20:12
标题: 求助:安乐业房产程序在nginx下的伪静态规则
安乐页房产程序,在Apache下运行正常,转到nginx下后,伪静态规则需要修改,

原来在iis下的规则为:
[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteEngine On
RewriteRule ^/community/g-([0-9]+)\.html\?*(.*)$ /community/general\.php\?id=$1
RewriteRule ^/community/d-([0-9]+)\.html\?*(.*)$ /community/structure\.php\?id=$1
RewriteRule ^/community/p-([0-9]+)\.html\?*(.*)$ /community/photo\.php\?id=$1
RewriteRule ^/newHouse/d-([0-9]+)\.html\?*(.*)$ /newHouse/detail\.php\?id=$1
RewriteRule ^/newHouse/p-([0-9]+)\.html\?*(.*)$ /newHouse/photo\.php\?id=$1
RewriteRule ^/newHouse/s-([0-9]+)\.html\?*(.*)$ /newHouse/structure\.php\?id=$1
RewriteRule ^/sale/d-([0-9]+)\.html\?*(.*)$ /sale/detail\.php\?id=$1
RewriteRule ^/rent/d-([0-9]+)\.html\?*(.*)$ /rent/detail\.php\?id=$1
RewriteRule ^/shop/([0-9]+)$ /shop/index\.php\?id=$1
RewriteRule ^/shop/e-([0-9]+)\.html\?*(.*)$ /shop/evaluate\.php\?id=$1
RewriteRule ^/shop/p-([0-9]+)\.html\?*(.*)$ /shop/profile\.php\?id=$1


请哪个好人将其转换为nginx下的伪静态规则,谢谢!!
不胜感激!!
作者: zoowo    时间: 2010-5-16 12:54
谁有呀,给一下吧。非常感谢。
作者: bjtime    时间: 2010-5-26 15:54
rewrite ^/community/g-([0-9]+)\.html\?*(.*)$ /community/general\.php\?id=$1;
        rewrite ^/community/d-([0-9]+)\.html\?*(.*)$ /community/structure\.php\?id=$1;
        rewrite ^/community/p-([0-9]+)\.html\?*(.*)$ /community/photo\.php\?id=$1;
        rewrite ^/newHouse/d-([0-9]+)\.html\?*(.*)$ /newHouse/detail\.php\?id=$1;
        rewrite ^/newHouse/p-([0-9]+)\.html\?*(.*)$ /newHouse/photo\.php\?id=$1;
        rewrite ^/newHouse/s-([0-9]+)\.html\?*(.*)$ /newHouse/structure\.php\?id=$1;
        rewrite ^/sale/d-([0-9]+)\.html\?*(.*)$ /sale/detail\.php\?id=$1;
        rewrite ^/rent/d-([0-9]+)\.html\?*(.*)$ /rent/detail\.php\?id=$1;
        rewrite ^/shop/([0-9]+)$ /shop/index\.php\?id=$1;
        rewrite ^/shop/e-([0-9]+)\.html\?*(.*)$ /shop/evaluate\.php\?id=$1;
        rewrite ^/shop/p-([0-9]+)\.html\?*(.*)$ /shop/profile\.php\?id=$1;
测试完整无错了的!




欢迎光临 源码论坛,商业源码下载,尽在锦尚中国商业源码论坛 (https://bbs.52jscn.com/) Powered by Discuz! X3.3