[英]Nginx Help Wordpress Custom Permalink Rewrite
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可能是'/ archives /%post_id%'不可能'/archives/%post_id%.html'
我所有的发帖链接都是“ .html”,我需要帮助!
设置永久链接'/ archives /%post_id%'的另一种方法
用户在帖子中连接' http://unknown/blog/archives/2604.html '(在Google中搜索)重定向->' http:// unknown / blog / archives / 2604 '
可能?
哦,我的上帝。 这个问题解决了。
我的错。
我使用了缓存
location ~* \.(html|htm|txt)$ {
#add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
access_log off;
expires 1d;
break;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.