[eluser]aeternuslibertas[/eluser]
my goal is that i want to have the appearance of a custom url for each user.
ex) john doe registers and wants his profile to be view from site.com/index.php/johndoe
i opened up my routes.php and added this
Code:
$route['([a-z]+)'] = "users/name/$1";
and added this code to my controller
(just to see if it works)
Code:
function name($name){
if($name==='johndoe'){
echo 'john doe';
}
else{
echo'you are not john';
}
my application is in site.com/index.php/main
and after implementing this code I noticed that my application fails to work(obviously b/c of the regular expression and if statement, but this was just a test to see if i could ultimately have a system as previously stated)
I guess my question is.. What is the best way to implement an idea like this(having in mind that the regular expression always checks for any combination of strings, but if its a controller i want it to go to the controller ex) site.com/index.php/register) honestly this is as far as I can brainstorm a solution.