Welcome Guest, Not a member yet? Register   Sign In
Need advice on SEO friendly URLs
#5

[eluser]aquary[/eluser]
You are having the same problem I had before. I asked in the forums and some guy came up with this solution.

I don't have the actual codes now, but it looks like these:

Code:
$route['(:any)/(:any)/(:any)'] = "location/city/$3";
$route['(:any)/(:any)'] = "location/country/$2";
$route['(:any)'] = "location/continent/$1";

Now, that solved the problem, but a new problem arise. All of the link will go to "location" controller, so you have to put more routing rules for all others controllers.

Code:
$route['contact'] = "contact/default";
$route['contact/(:any)'] = "contact/$1";
$route['articles'] = "articles/default";
$route['articles/(:any)'] = "articles/$1";
$route['(:any)/(:any)/(:any)'] = "location/city/$3";
$route['(:any)/(:any)'] = "location/country/$2";
$route['(:any)'] = "location/continent/$1";


Messages In This Thread
Need advice on SEO friendly URLs - by El Forum - 09-01-2009, 08:33 PM
Need advice on SEO friendly URLs - by El Forum - 09-01-2009, 08:46 PM
Need advice on SEO friendly URLs - by El Forum - 09-02-2009, 12:07 AM
Need advice on SEO friendly URLs - by El Forum - 09-02-2009, 12:41 AM
Need advice on SEO friendly URLs - by El Forum - 09-02-2009, 02:34 AM
Need advice on SEO friendly URLs - by El Forum - 09-02-2009, 03:57 AM
Need advice on SEO friendly URLs - by El Forum - 09-02-2009, 11:52 AM
Need advice on SEO friendly URLs - by El Forum - 09-02-2009, 02:16 PM
Need advice on SEO friendly URLs - by El Forum - 09-02-2009, 07:03 PM
Need advice on SEO friendly URLs - by El Forum - 09-03-2009, 03:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB