Udders
Udders

Reputation: 6976

Codeigniter routing

In Codeigniter is it possible to make routing ignore a certain pattern but route everything else, for example I would like tests/index to be treated as normal but anything other than /index I would like to routed through tests/test is this possible?

Upvotes: 1

Views: 236

Answers (1)

Jess
Jess

Reputation: 8700

Not positive how well this will work, but try It should match everything but index, and route it to the tests/whatever it matched.
$routes["test\/((?!index).*)"] = 'tests/$1';

Upvotes: 1

Related Questions