Welcome Guest, Not a member yet? Register   Sign In
another dynamic routes topic
#7

[eluser]juliano.ma[/eluser]
[quote author="jakelehner" date="1341591276"]Are you only wanting to use regex for urls that start with 'articles/'? If so, you can write your regex to only apply to those requests rather than everything.[/quote]

In my example, any URL that is different from the routes generated, redirects to My_router.
Except the URL's to the default routes.

This helps when you want the title of an article in the first segment.

example:
mysiteurl.com/my-blog-title-post

In the controller My_router you can search for "my-blog-post-title" in the database. If not, go to 404 or any page you want.


Messages In This Thread
another dynamic routes topic - by El Forum - 03-08-2012, 03:52 PM
another dynamic routes topic - by El Forum - 03-08-2012, 04:16 PM
another dynamic routes topic - by El Forum - 03-08-2012, 04:23 PM
another dynamic routes topic - by El Forum - 03-08-2012, 04:40 PM
another dynamic routes topic - by El Forum - 07-06-2012, 08:14 AM
another dynamic routes topic - by El Forum - 07-06-2012, 09:14 AM
another dynamic routes topic - by El Forum - 07-06-2012, 10:02 AM
another dynamic routes topic - by El Forum - 07-06-2012, 10:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB