如何在使用.htaccess的URL中将%252C替换为连字符?示例URL:
.htaccess
%252C
http://example.com/sitename/New-York-Mills/New+York+Mills%252C+MN%252C+United+States/tamarind/New+york
0h4hbjxa1#
请尝试:
RedirectMatch 301 ^/(.*)\%2[Cc](.*)$ /$1-$2
或者,如果您已经有了重写规则,请坚持使用mod_rewrite:
RewriteRule ^(.*)\%2[Cc](.*)$ /$1-$2 [L,R=301]
1条答案
按热度按时间0h4hbjxa1#
请尝试:
或者,如果您已经有了重写规则,请坚持使用mod_rewrite: