Welcome Guest, Not a member yet? Register   Sign In
How to hide URL details
#2

[eluser]ebuoe[/eluser]
what you need is the route config .. go to your config folder ,you will see the route file open it and set the following rules

$route['(:any)/(:any)'] = "blog/view_blog/username/blog_name";

the 1st any will represent the username and the second will be for the blog_name

to retrieve them in your controller use

function view_blog()
{
$user_name = $this->uri->segment(1);

$blog_name = $this->uri->segment(2);

//you can now use the variables as you wish , note you should also set route rules for other pages on the site so taht they don't intefer with the any variable
}


Messages In This Thread
How to hide URL details - by El Forum - 03-31-2011, 11:23 PM
How to hide URL details - by El Forum - 04-01-2011, 02:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB