Nginx does not support configuration. the htaccess file to achieve 301 permanent redirection and pseudo-static. It must be configured in the Nginx site file (usually in the "/usr/local/nginx/conf/vhost" folder) use the rewrite command. After the fixed link structure of this site is changed, the Nginx 301 permanent redirect configuration is as follows:
Rewrite ^/(2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015)/(. * example .html $ scheme: // $ host/archives/example 2.html permanent;
Place the above 301 permanent redirection configuration in any location under the server_name line. After restarting the Nginx service, you can redirect the articles in the corresponding year to the archives Directory, if your fixed link structure is inconsistent with mine, please adjust it accordingly.
For sites that rely mainly on Baidu traffic, after modifying the fixed link, be sure to submit "rule revision" under the Baidu webmaster platform-website revision section ", make sure that the weight of the old link is passed to the new link address as soon as possible.