Mianco
V2EX  ›  WordPress

关于Nginx下WordPress的伪静态问题

  •  
  •   Mianco · Jul 6, 2010 · 5387 views
    This topic created in 5828 days ago, the information mentioned may be changed or developed.
    我的wordpress是装在二级目录下,类似 /www/blog/

    网上搜索了下伪静态的写法,都是针对一级目录的。当我自定义超链接样式时则无效。

    请问这种情况如何修改?
    2 replies    1970-01-01 08:00:00 +08:00
    Kymair
        1
    Kymair  
       Jul 6, 2010
    这样不行么?

    location /blog {
    if (-f $request_filename/index.php) {
    rewrite (.*) $1/index.php;
    }
    if (!-f $request_filename){
    rewrite ^/blog/(.*)$ /blog/index.php;
    }
    }
    Mianco
        2
    Mianco  
    OP
       Jul 6, 2010
    谢谢,已解决。这个按照什么规则写的?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   790 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 21:24 · PVG 05:24 · LAX 14:24 · JFK 17:24
    ♥ Do have faith in what you're doing.