2016-09-22 155 views
0

Nginx的帮助WordPress的自定义永久链接重写问题。Nginx的帮助WordPress的自定义永久链接重写

测试地点:http://unknown/blog/ 帖子链接:http://unknown/blog/archives/2604.html(404错误)

我的永久链接设置为 '/archives/%post_id%.html'

的index.php的$ args?参数不是'.html'的认可。

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

的$ args 是可能的 '/档案/%POST_ID%' 是不可能的 '/archives/%post_id%.html'

我所有的帖子链接 '的.html' 我需要帮助!

回答

0

哦,我的天啊。 这个问题解决了。

我的错误。

IM中使用的高速缓存

location ~* \.(html|htm|txt)$ { 
    #add_header Pragma public; 
    add_header Cache-Control "public, must-revalidate, proxy-revalidate"; 
    access_log off; 
    expires 1d; 
    break; 
    } 
相关问题