[eluser]ovulator[/eluser]
I am trying to rempap a uri using a regular expression.
I want it so that if someone goes to example.com/product/1111x11
they will be redirected to example.com/product/number/1111x11
All I need to make sure is that the first four characters are digits so I used this
Code:
$route['product/(^\d{4})'] = 'product/number/$1';
Which is not working. I know that the regular expression: ^\d{4} works for what I want it to do, but it isn't working here. I just get a 404 error. I tried
Code:
$route['product/(\d+)'] = 'product/number/$1';
Which works if the product is only numbers, but some have letters after the fourth digit, so it doesn't work for the. Any help?