Welcome Guest, Not a member yet? Register   Sign In
Basic index($variable) question for creating a site like www.mysite.com/username
#8

[eluser]PhilTem[/eluser]
Well yeah, then it's obvious why your code isn't working. Just as @siptik said you need to create a route called

Code:
$route['.+'] = 'main/index/$1';

which will route every request to your page to the main controller's index() method and will pass the uri segments as arguments in order of appearance in the URI.

What your code does is nothing else than allowing URIs like this
Code:
www.example.com/main/index/<username>
which, however, is not what you intentionally wanted Wink


Messages In This Thread
Basic index($variable) question for creating a site like www.mysite.com/username - by El Forum - 11-12-2012, 02:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB