Vladislav Kovalyov
Vladislav Kovalyov

Reputation: 803

Codeignitere route regex 404

I'm trying to make dynamic route for user pages. My route config looks next:

$route['id[0-9+]'] = 'user/index/$1';

On my Mac with MAMP it works fine. I can access to user's page with next uri (for example):

http://localhost:8888/MySite/id1

But the same uri doesn't work on the server and on my partner's windows-machine. I can access to page with user/index/1 and all another static routes works fine. I think there is a problem with regular expression, but I can't figure out what the problem is.

Upvotes: 0

Views: 56

Answers (1)

vks
vks

Reputation: 67988

'id[0-9]+'

I guess you mean this.This will match id87 or id67723.

id[0-9+] will match id9+ or id8 or id+

Upvotes: 1

Related Questions