使用空格()为URL创建Nginx重定向
发布时间:2020-12-13 21:19:04 所属栏目:Nginx 来源:网络整理
导读:我需要为html文件名中包含空格的URL创建重定向. 我需要与此相当的nginx: Redirect 301 "/Poorly Titled File.html" http://domain.com/new-url/ 我试过了: rewrite ^/Old%20Page%20Title.html$$scheme://domain.com/new-url/ permanent;location /Old%2
我需要为html文件名中包含空格的URL创建重定向. 我需要与此相当的nginx:
我试过了:
有和没有逃避%的. 最佳答案
使用’在该位置附近:
另见SO Nginx rewrite that includes a blank spce问题. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |