Welcome Guest, Not a member yet? Register   Sign In
URL shortening service
#10

[eluser]xwero[/eluser]
It depends how many more controllers you have. If it's a url shortener service the controllers will be limited so you can add them to the route config file
Code:
$route['([a-zA-Z0-9]+)'] = 'snip/url/$1';
$route['(upload|login)(.*)'] = '$1$2';
To go to the snip/index method snip will be the a value of the first parameter so you snip is a reserved word that you check in the url method.

If you have quite a few controllers you can add a tilde for example before the actual shortened part so you get http://uqyg.com/~MwqJE which you can route.
Code:
$route['~([a-zA-Z0-9]+)'] = 'snip/url/$1';


Messages In This Thread
URL shortening service - by El Forum - 06-02-2009, 02:36 AM
URL shortening service - by El Forum - 06-02-2009, 03:01 AM
URL shortening service - by El Forum - 06-02-2009, 03:02 AM
URL shortening service - by El Forum - 06-02-2009, 03:10 AM
URL shortening service - by El Forum - 06-02-2009, 04:13 AM
URL shortening service - by El Forum - 06-02-2009, 06:20 AM
URL shortening service - by El Forum - 06-02-2009, 06:44 AM
URL shortening service - by El Forum - 06-02-2009, 06:48 AM
URL shortening service - by El Forum - 06-02-2009, 06:56 AM
URL shortening service - by El Forum - 06-02-2009, 07:00 AM
URL shortening service - by El Forum - 06-02-2009, 07:19 AM
URL shortening service - by El Forum - 06-02-2009, 07:31 AM
URL shortening service - by El Forum - 06-02-2009, 07:44 AM
URL shortening service - by El Forum - 06-02-2009, 07:47 AM
URL shortening service - by El Forum - 06-02-2009, 07:53 AM
URL shortening service - by El Forum - 06-02-2009, 08:03 AM
URL shortening service - by El Forum - 06-02-2009, 08:11 AM
URL shortening service - by El Forum - 06-02-2009, 08:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB