The project was recently revised and the page was completely static. The original dynamic page needs to be permanently redirected to a static page by 301, so that the search will transfer the weight of the original page to the new static page. If ($ query_string ~ * & Quot; id (\ d +) $ & quot;) {set $ id $1; rewrite...
The project was recently revised and the page was completely static.
The original dynamic page needs to be permanently redirected to a static page by 301, so that the search will transfer the weight of the original page to the new static page.
If ($ query_string ~ * "Id = (\ d +) $ "){
Set $ id $1;
Rewrite ^/goods \. php/goods/$id.html permanent;
}
This redirection finds when the http://www.2cto.com/goods. php? When id = 254 will jump to the http://xxx.com/goods/254.html? Under id = 254
The search engine's indexed address is also added with unnecessary parameters. the boss called to remove the following parameters. What should we do?
For example:
Put http://example.com/test.php? Para = xxx redirection to http://example.com/new
Rewrite ^/test. php (. *)/new permanent;
The result after redirection is: http://www.2cto.com/new? Para = xxx
If it is rewritten to: rewrite ^/test. php (. *)/new? Permanent;
The result is: http://www.2cto.com/new
So the key point is "?". This suffix. What if I want to retain a specific parameter? You can use the $ arg_PARAMETER parameter included in Nginx.
For example:
Set http://www.2cto.com/test. php? Para = xxx & p = xx rewrite to http://www.2cto.com/new? P = xx
Can be written as: rewrite ^/test. php/new? P = $ arg_p? Permanent;
From small? Too many tasks? /P>