简体   繁体   English

Apache htaccess 301 使用特殊字符重定向

[英]Apache htaccess 301 redirect with special characters

Really struggling with this, all 301 redirects in htaccess (the ones without special characters) are working apart from this one.真的很挣扎,htaccess 中的所有 301 重定向(没有特殊字符的重定向)都与这个不同。 I need to redirect from我需要从

/folder1/departmentpage.html/customerx/_438081/1/Sofabeds%2520for%2520Small%2520%252D%2520Medium%2520or%2520Large%2520Rooms

TO

http://www.newsite.com/sofabeds

Any help would be greatly appreciated.任何帮助将不胜感激。

You could do something as simple as this.你可以做一些像这样简单的事情。

RewriteCond %{REQUEST_URI} ^(.*)Sofabeds(.*)
RewriteRule ^ http://www.newsite.com/Sofabeds [R=301,L]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM