Welcome Guest, Not a member yet? Register   Sign In
Help with route regex if specific words are present
#1

[eluser]CroNiX[/eluser]
I have a few custom pages like
site.com/about
site.com/help
site.com/privacy

Currently they are going to their own controllers. I want to create a generic controller that will handle these specific pages but leave the rest of the routing alone.

I think this is close but can't quite get it. I'm a regex idiot...and I admit it.
Code:
$route['((?about|help|home|privacy|tou).*)'] = 'custom_page/$1';

Thanks for any help.


Messages In This Thread
Help with route regex if specific words are present - by El Forum - 01-13-2011, 12:30 PM
Help with route regex if specific words are present - by El Forum - 01-13-2011, 12:59 PM
Help with route regex if specific words are present - by El Forum - 01-13-2011, 01:06 PM
Help with route regex if specific words are present - by El Forum - 01-18-2011, 07:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB