Welcome Guest, Not a member yet? Register   Sign In
twitter like urls
#1

[eluser]dadamssg[/eluser]
is it possible with codeigniter to have urls like twitter? I have a register form and id like the profiles to be located at mysite.com/a_user
#2

[eluser]John Pantoja[/eluser]
what's Twitter?? LOL

Check out the url routing in the CI wiki, the force is strong with it.

I think social apps are the down fall of the web personally, one does not need to know the was of the farce to post useless information about their cat eating a cheezburger (yeah I'm a LOLCat fan)
#3

[eluser]tomcode[/eluser]
I'd do :

1. config/routes.php
Code:
$route['default_controller'] = "welcome";
$route['scaffolding_trigger'] = "";
$route['(:any)'] = "welcome/$1";

2. controllers/welcome.php
Code:
function Welcome()
{
    parent::Controller();
}

function _remap($user)
{
    if($user == 'index')
    {
        $this->load->view('welcome');
    }
    else
    {
       // user related stuff
    }
}




Theme © iAndrew 2016 - Forum software by © MyBB