[英]mod_rewrite issues with RewriteRule
Can this rule be modified:是否可以修改此规则:
RewriteRule ^/it(.*)$ /information-technology$1 [R=301,NC,L,QSA]
to handle all scenarios below?处理下面的所有场景? (As-is above does not work for those marked ERROR )
(原样不适用于标记为ERROR 的那些)
/it
/IT
/it/
/IT/
(ERROR - does not redirect) /IT/
(错误 - 不重定向) -- ——
/it/team/
redirects to /information-technology/team/
/it/team/
重定向到/information-technology/team/
/it/team
(ERROR - does not redirect) /it/team
(错误 - 不重定向)/IT/team
redirects to /information-technology/
(ERROR) /IT/team
重定向到/information-technology/
(错误)/IT/team
/ redirects to /information-technology/
(ERROR) /IT/team
/ 重定向到/information-technology/
(错误) -- ——
/italics
redirects to /information-technology/alics
(ERROR) /italics
重定向到/information-technology/alics
(错误) -- ——
Thank you for your help in advance!!提前谢谢你的帮助!!
You may use this rule:你可以使用这个规则:
RewriteRule ^/?it(/.*)?$ /information-technology$1 [R=301,NC,NE,L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.