Only recently noticed this issue with my site configurations, it seems as though on my NGINX Wordpress sites the category base of a URL is not being respected and instead being redirected to another category which uses the same post_name slug as the new post. This results in me unable to make any unique name posts since it's ignoring the category base entirely!
I'm not entirely sure why this is the case and would love if someone could help with this. Details below.
An example expected scenario
=> will go to /category-1/post-1 => will go to /category-2/post-1
Current scenario
=> will go to /category-1/post-1 => will go to /category-1/post-1
Any new posts will produce the following
=> post exists at /category-1/post-1 => new post created with exists at /category-2/post-1-2 extension
My settings in the permalinks for Wordpress
My NGINX configurations for /location is below
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# break if URI has .html extension
if ($request_filename ~* ^.+.html$) {
break;
}
# add .html to URI and serve file, directory, or symlink if it exists
if (-e $request_filename.html) {
rewrite ^/(.*)$ /$1.html last;
break;
}
try_files $uri $uri/ /index.php?q=$uri&$args;
# try_files $uri $uri/ =404;
}
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745362653a4624429.html
评论列表(0条)