2016-09-22 3 views
0

NginxヘルプWordpressカスタムパーマリンクリライトの問題。NginxヘルプWordpressカスタムパーマリンクリライト

テストサイト:http://unknown/blog/ ポストリンク:?http://unknown/blog/archives/2604.html(404エラー)

私のパーマリンクの設定は '/archives/%post_id%.html'

index.phpを$ argsをです。 argsは '.html'認識ではありません。

location /blog/ { 
    try_files $uri $uri/ /blog/index.php?$args; 
} 

$ argsを は、可能な '/アーカイブ/%post_idのの%' であることは不可能である '/archives/%post_id%.html'

私のすべての投稿のリンクは、私は助けを必要とする '.htmlを' です!

答えて

0

ああ私の神。 この問題は解決しました。

私の間違い。

イムは、キャッシュを使用

location ~* \.(html|htm|txt)$ { 
    #add_header Pragma public; 
    add_header Cache-Control "public, must-revalidate, proxy-revalidate"; 
    access_log off; 
    expires 1d; 
    break; 
    } 
関連する問題