lycomeon 发表于 2012-3-22 12:00:26

求apache规则转换成nginx~谢谢

RewriteRulespecial/(+).html$ special.php?type=$1
求转换,谢谢。军哥 求帮助。。

licess 发表于 2012-3-22 18:43:51

http://blog.licess.org/convert-apache-htaccess-to-nginx/用这个转换试试

baike 发表于 2013-4-17 22:14:10

规则转换后重启还是不起作用

阿帕奇的规则
RewriteRule ^single/(+_**).html$ single.php\?f=$1
RewriteRule ^like\/(+)$ like.php\?id=$1
RewriteRule ^topic\/+\/(+_**)\.html$ art.php\?id=$1
RewriteRule ^+\/+(+)$ topic.php\?id=$1
RewriteRule ^(+_**)\.html$ type.php\?id=$1
RewriteRule ^+\/+(+_**)\.html$ topic_list.php\?id=$1

我转换后的
location / { rewrite ^/single/(+_**).html$ /single.php?f=$1;
    rewrite ^/like/(+)$ /like.php?id=$1;
    rewrite ^/topic/+/(+_**).html$ /art.php?id=$1;
    rewrite ^/+/+(+)$ /topic.php?id=$1;
    rewrite ^/(+_**).html$ /type.php?id=$1;
    rewrite ^/+/+(+_**).html$ /topic_list.php?id=$1;
    }
/etc/init.d/nginx start 后 访问依然404 求解
页: [1]
查看完整版本: 求apache规则转换成nginx~谢谢