htaccess重定向加号 [英] htaccess redirect a plus sign
本文介绍了htaccess重定向加号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试将URL从旧站点重定向到新站点,但是它不起作用. 我认为加号给我带来了麻烦.
I try to make a redirect of a URL from my old site to my new site, but it does not work. I think that the plus symbol is giving me problems.
RewriteRule ^nl/pageid/junair+compressor+onderhoud(|/)$ /nl/persluchttechniek/page/nieuwsberichten/compressor-onderhoud-junair [R=301,L]
推荐答案
在旧站点的根.htaccess中尝试以下重定向规则:
Try this redirect rule in your root .htaccess of old site:
RewriteRule ^nl/pageid/junair[\s+]compressor[\s+]onderhoud/?$ /nl/persluchttechniek/page/nieuwsberichten/compressor-onderhoud-junair [NC,B<R=301,L]
确保这是您在RewriteEngine
行下的第一条规则.还要检查系统中是否没有其他.htaccess.
Make sure this is your very first rule below RewriteEngine
line. Also check there is no other .htaccess in your system.
这篇关于htaccess重定向加号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文