简体   繁体   中英

Nginx Help Wordpress Custom Permalink Rewrite

Nginx Help Wordpress Custom Permalink Rewrite problem.

Test site : http://unknown/blog/ Post link : http://unknown/blog/archives/2604.html(404 error)

My permalink settings is '/archives/%post_id%.html'

index.php?$args . args is not '.html' recognition.

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

$args is possible '/archives/%post_id%' is not possible '/archives/%post_id%.html'

my all posting link is '.html' i need help !

Another method set permalink '/archives/%post_id%'

user connect in post ' http://unknown/blog/archives/2604.html ' (search in google) redirect -> ' http://unknown/blog/archives/2604 '

possible?

Oh my god. this problem is solved.

my mistake.

im used the Caching

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM