Regex Syntax for case insensitivity? (2 posts)

  1. toobaroo
    Posted 5 years ago #

    What is the Regex Syntax for case insensitivity? I want my redirects to work whether someone types in upper or lower or a combination.

    For example:

    Source: /contact or /CONTACT or /CoNtAct

    Target: http://domainname/contact-my-company-name

    How do I use "regex" to make sure that any variation of the source, regardless of upper/lower case will still work properly and redirect

  2. openmtl
    Posted 4 years ago #

    You can't do that with the /i flag because of how the from URL is poked into the preg_match() in the redirector code but you must do it like this in the from URL...


    as an example. That will match /Contact or /CONTACT//// or anythig in between e.g. /CoNtAcT/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Redirection
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic