CodeIgniter Forums

Full Version: uri segment 3 without index.php in the uri/url?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]thesocialhacker[/eluser]
Hello all,

Here's the idea; I'd like users to be able to goto mycodeigniterprog.com/USERNAME in order to view a profile page- with out the users having to type in "/index.php/USERNAME"

How is this done (the CI way)?

El Forum

[eluser]thesocialhacker[/eluser]
if some one could go over the :any routing like "$route['(:any)'] = 'whatever/$1';"

i simply want to pass GET using uri segment with out the user typing index.php - i don't care what the url's look like while the users following links.

also- if i mess around and just put "$route['(:any)'] = 'whatever/$1';" other aspects of the site will break, such as login, and other POST related stuff...

also also- i'm thinking that maybe i could add each user to the routing individually, maybe in autoload.php or something? just an idea...

El Forum

[eluser]Dennis Rasmussen[/eluser]
To remove index.php read http://codeigniter.com/wiki/Dreamhost_.htaccess/
And there's a couple of methods here to use the first segment as a parameter: http://ellislab.com/forums/viewthread/104074/

If you didn't find what you're looking for, I've seen something like $route['404'] which can be used as well.