How to make url /username in codeigniter?
问题 I'm using codeigniter at the moment. I am currently able to view a persons profile by the using /user/profile/profile_id but I want to make it so that a user can just navigate to a profile using /username to make it simpler. How would I go about doing this I'm not sure where to start? class User extends CI_Controller{ public function index(){ if($this->session->userdata('is_logged_in')){ redirect('user/profile'); } } public function profile(){ $profile_id = $this->uri->segment(3); $ip = $this