nginx redirect url to new pattern

前端 未结 2 1075
深忆病人
深忆病人 2021-01-28 17:40

I\'m currently switching my blog from Wordpress to Ghost. There is nginx in front of ghost. After migration i recognized that old urls

http://domain.org/2015/10         


        
2条回答
  •  臣服心动
    2021-01-28 18:14

    I think you should put into server section:

    rewrite ^/[0-9]*/[0-9]*(/.*) $1 last;
    

    But if you've any additional requests maybe would better in a location section (as you wrote).

    About more information see on the official nginx documentation.

提交回复
热议问题