phpcj 发表于 2011-7-17 19:47:47

高手们给看一下伪静态规则,实在无奈了。

这是APACHE下的,正常使用的。
RewriteEngine on
RewriteRule ^+\/+_(+_**)\.html$ art.php\?id=$1
RewriteRule ^hot\/(+)\.html$ like.php\?id=$1
RewriteRule ^+\/+\/(+)\.html$ topic.php\?id=$1
RewriteRule ^single/(+_**).html$ single.php\?f=$1
RewriteRule ^(+_**)\.html$ type.php\?id=$1
RewriteRule ^+\/+(+_**)\.html$ topic_list.php\?id=$1

我用军哥提供的转换成
rewrite ^/+\/+_(+_**)\.html$ /art.php\?id=$1;
        rewrite ^/hot\/(+)\.html$ /like.php\?id=$1;
        rewrite ^/+\/+\/(+)\.html$ /topic.php\?id=$1;
        rewrite ^/single/(+_**).html$ /single.php\?f=$1;
        rewrite ^/(+_**)\.html$ /type.php\?id=$1;
        rewrite ^/+\/+(+_**)\.html$ /topic_list.php\?id=$1;

结果是404,实在没办法了
高手帮看看规则有问题吗?

licess 发表于 2011-7-17 20:43:55

可能是转换后的伪静态有问题

admin888 发表于 2011-7-21 12:50:25

看不不懂,帮忙顶下!

iseeyou 发表于 2011-7-21 13:06:37

http://www.anilcetin.com/convert-apache-htaccess-to-nginx/
页: [1]
查看完整版本: 高手们给看一下伪静态规则,实在无奈了。