Support » Plugin: Redirection » [Plugin: Redirection] Case (in)sensitive option?

  • Is there an option I am just missing to make the URL match portion case insensitive? Just got bit by this one as I had one of the site administrators create a redirection for tracking purposes and it wasn’t working when the user didn’t use the same case for all the letters as the redirection URL had. I went in and modified it to use a regex and did an [Aa] type thing for every letter, but having a check box to make it case insensitive would be very helpful. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Of course we can do this through RegEx like in this example but you have to admit that it’s rather time-intensive and that most users of the plugin wouldn’t know the first thing about setting up a RegEx expression.

    I totally agree with @sgastevep. A checkbox for this feature would be awesome.

    +1 for a case-insensitive checkbox!

    This would be a fantastic option. It’s pain the butt trying to come up with all the various why any one person can type something in.

    Another +1

    +1000!!! This burns me on a regular basis. I LOVE this plugin but the case sensitivity is certainly a Pain.

    I’m not sure if my option is the best (especially since it involves hacking the core code of the plugin which would be lost on update) but it seems to be working and it might help some of you guys out, this is what I did…

    File: /redirection/models/redirect.php
    Line: 300

    Looking for:

    function matches( $url ) {
    		$this->url = str_replace( ' ', '%20', $this->url );
    		$matches   = false;

    Changing to:

    function matches( $url ) {
    		$url = strtolower($url);
    		$this->url = str_replace( ' ', '%20', $this->url );
    		$this->url = strtolower($this->url);
    		$matches   = false;

    If you want this case insensitive check the ‘Regex’ option and enter the Source URL with a (?i) in the front:

    As it is an regular expression now some characters like ?, ., [, ], (, ), {, }, ^, $ may have a special meaning and should all be prepended with a backslash like '\.' in the above example.

    +1 for this option. Any chance it will be added?

    Dead silence in here

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Redirection] Case (in)sensitive option?’ is closed to new replies.