Welcome Guest, Not a member yet? Register   Sign In
URI routing to give impression of directories
#4

[eluser]mddd[/eluser]
If your page name is only going to be in the last piece of the url, you could just make your route like this:
Code:
$route['en/(.*)([^/]+)'] = 'page/index/en/$2';
This will 'throw away' anything between 'en' and the last part of the uri.
So en/hotel_eden will go to page/index/en/hotel_eden.
But en/hotels/hotel_eden will also go to page/index/en/hotel_eden.
And en/a/b/c/d/hotel_eden will also go to page/index/en/hotel_eden.

The downside is, of course, that the 'folder name' does not do anything. So you couldn't have a page en/hotels/list and a page en/restaurants/list because both would go to 'list'.


Messages In This Thread
URI routing to give impression of directories - by El Forum - 08-18-2010, 08:05 AM
URI routing to give impression of directories - by El Forum - 08-18-2010, 08:10 AM
URI routing to give impression of directories - by El Forum - 08-18-2010, 09:39 AM
URI routing to give impression of directories - by El Forum - 08-18-2010, 10:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB