.htaccess - Regex rule for URL redirect case and directories -


i looking following url redirect configuration regex:

current url: http://support.olddomain.com/en-us/company/help_files/ab012345 new url: http://support.newdomain.com/articles/cde678910

the problem have case issues , other directories:

support.olddomain.com/en-us/company/help_files/ab012345 - lowercase en_us support.olddomain.com/en-us/company/help_files/ab012345 - capitalized company support.olddomain.com/en-us/company/help_files/ab012345?title=article+title - additional parameters

support.olddomain.com/en-us/company/all_files/ab012345 - on all_files, not hel_files

thus, want redirect url path ab###### proper page on newdomain.com following conditions:

  1. works http , https
  2. ignores capitalization
  3. ignores parameters
  4. works both all_files , help_files directories.

any welcome. thank you!

i've done in notepad++ ctrl+h

find: ^([\w+\.]+)\/(?=.*ab.*) replace: newdomain.com/


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -