Reputation: 948
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)
/it
/IT
/it/
/IT/
(ERROR - does not redirect)--
/it/team/
redirects to /information-technology/team/
/it/team
(ERROR - does not redirect)/IT/team
redirects to /information-technology/
(ERROR)/IT/team
/ redirects to /information-technology/
(ERROR)--
/italics
redirects to /information-technology/alics
(ERROR)--
Thank you for your help in advance!!
Upvotes: 1
Views: 14
Reputation: 784898
You may use this rule:
RewriteRule ^/?it(/.*)?$ /information-technology$1 [R=301,NC,NE,L]
Upvotes: 1