全球主机交流论坛

标题: 想投怀nginx,但是wp的固定链接能过度吗? [打印本页]

作者: Favsky    时间: 2010-3-7 09:38
标题: 想投怀nginx,但是wp的固定链接能过度吗?
现在用wordpress的固定链接是/%category%/%postname%.html

google过,都是把htaccess直接转换的,但是无论是什么格式,htaccess都是一样

看了大多数转换后都是/%category%/%postname%,不带.html,

请问怎样把固定链接带.html
作者: cpuer    时间: 2010-3-7 09:44
标题: 回复 1# 的帖子
应该可以的,shinko应该试过
作者: zhangyin27    时间: 2010-3-7 11:25
可以,我用的是/archive/%postname%.html
作者: fanslive    时间: 2010-3-7 11:27
可以,一条简单的规则就解决问题了
作者: fanslive    时间: 2010-3-7 11:29
    if (!-e $request_filename) {
                                                rewrite ^(.*)$ /index.php?q=$1 last;

作者: cpuer    时间: 2010-3-7 11:36
标题: 回复 5# 的帖子
WordPress的伪静态其实是index.php来处理的
作者: addmyin    时间: 2010-3-7 11:49
提示: 作者被禁止或删除 内容自动屏蔽
作者: fish    时间: 2010-3-7 13:02
标题: 回复 1# 的帖子
html后缀在wp里面设,和nginx无关

我博客是这样设的
                location /
                {
                        autoindex off;
                        set $wp_super_cache_file '';
                        set $wp_super_cache_uri $request_uri;
                        if ( $request_method = POST )
                        {
                                set $wp_super_cache_uri '';
                        }
                        if ( $query_string )
                        {
                                set $wp_super_cache_uri '';
                        }
                        if ( $http_cookie ~* "comment_author_|WordPress|wp-postpass_" )
                        {
                                set $wp_super_cache_uri '';
                        }
                        if ( $wp_super_cache_uri ~ ^(.+)$ )
                        {
                                set $wp_super_cache_file /wp-content/cache/wp_super_cache/$http_host/$1index.html;
                        }
                        if ( -f $document_root$wp_super_cache_file )
                        {
                                rewrite ^(.*)$ $wp_super_cache_file break;
                        }
                        if (-f $request_filename)
                        {
                                expires 30d;
                                break;
                        }
                        if (!-e $request_filename)
                        {
                                rewrite ^(.+)$ /index.php?q=$1 last;
                        }

作者: cpuer    时间: 2010-3-7 13:04
标题: 回复 8# 的帖子
用了wp super cache插件后规则更复杂了。
作者: Showfom    时间: 2010-3-7 17:18
可以啊
我都用了大半年了
http://zou.lu/
作者: 删除    时间: 2010-3-7 17:54
http://fengzi.org
啥也不说了




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