Redirection doesn't work in Live [config.php]


#1

I have an issue regarding redirection, here redirection’s only working locally. when I test same web address at live it doesn’t work.

I have setup my routes in site/config/config.php

c::set('routes', array(
  array(
  	'pattern' => "let's-go",
        'action'  => function() {

      // Redirect let's-go -> lets-go

      //  redirect::to('lets-go');

      //  return go("lets-go");

      header::redirect('lets-go');
    }
  ),

I’ve tried those 3 of methods for redirection, but nothing seemed to work out.
Although redirecting using .htaccess works fine but I don’t want to use that.
If anyone’s familiar with this kind of issue help me.


#2

Do. you use an additional. config file for your live site with routes?


#3

No, I have only one config file.


#4

does it work with patterns that do not. contain an apostrophe?


#5

No !!, no route is working at live, which has been defined in config.php file.


#6

any idea what’s going on here.


#8

tried both, but nothing worked for me, actually no url is working for redirection, if i try to redirect with other path, without the apostrophes it also doesn’t work for it.