在NGINX中执行301重定向时跳过参数
第一个帖子在这里。 所以我使用这段代码将特定页面从一个域重定向到另一个域 如果$request_filename ~/{rewrite^https://example.net 永久;} 有没有跳过代码中包含?d=的任何内容的选项?在NGINX中执行301重定向时跳过参数,nginx,http-status-code-301,Nginx,Http Status Code 301,第一个帖子在这里。 所以我使用这段代码将特定页面从一个域重定向到另一个域 如果$request_filename ~/{rewrite^https://example.net 永久;} 有没有跳过代码中包含?d=的任何内容的选项? 我不希望重定向中包含?d=之后的任何页面。如果重写的URL以?结尾,则“重写”不会复制任何原始参数 例如: rewrite ^ https://example.net/? permanent; 有关详细信息,请参阅 或者,使用更简单的返回表达式: return 30
我不希望重定向中包含?d=之后的任何页面。如果重写的URL以?结尾,则“重写”不会复制任何原始参数 例如:
rewrite ^ https://example.net/? permanent;
有关详细信息,请参阅
或者,使用更简单的返回表达式:
return 301 https://example.net/;