Same URL for different rutes expression in codeigniter

12 Views Asked by At

How use same url for different rutes expression in codeigniter. For exemple, to use "x" like any word in my code and always to result in same url?

$route['list'] ='x/list';

Url expected: mysite.com/list

1

There are 1 best solutions below

0
On

You have to set a value for x as $x = "http://www.example.com"; then use it like this $route['list'] ='$x/list'; but you may need to revise the $route[''] variable name list, view example on https://www.javatpoint.com/codeigniter-url-routing