Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8679501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:59:15+00:00 2026-06-12T20:59:15+00:00

I want to have a clean URL in CodeIgniter based application for User’s Profile

  • 0

I want to have a clean URL in CodeIgniter based application for User’s Profile Information.

Please Take a look at URL formats below.

Actual URL : http://www.mydomain.com/index.php/users/profile/user1

I’m expecting users to have Personal URL’s like

http://www.mydomain.com/user1
http://www.mydomain.com/user2
http://www.mydomain.com/user3

URL http://www.mydomain.com/user1 should process http://www.mydomain.com/index.php/users/profile/user1 in background execution.

I will be removing index.php from URL using Route library.

Thanks in advance for any sort of help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:59:17+00:00Added an answer on June 12, 2026 at 8:59 pm

    Have a look at https://www.codeigniter.com/user_guide/general/routing.html.

    $route['user(:num)'] = "users/profile/user/$1";
    

    If you mean you want /anyusername to route to the users controller, you would have to put:

    $route['(:any)'] = "users/profile/$1";
    

    At the bottom of routes.php and every non user-URL above it. Otherwise every URL would be routed there, obviously. You will need to implement some mechanism in the users-controller to throw 404-errors, since you are routing all requests not catched in the routing rules above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hai I have worked with clean URL in php. Now I want to convert
I have a sub directory named blog. I want to clean the url when
I am overriding the clean() method on a Django form. I want to have
I have a huge Ping list and want to clean it. Using PHP I
I have a UITextView and I want have two buttons. When the user taps
I want to use a RewriteRule to clean up my URL, i need the
I have a user control with a hyperlink control within it. The application is
I have too many doubts about this topic. I want to create a clean
I have this web application that has grown to an unmanageable mess. I want
I have a Codeigniter app and i want to track the search with Google

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.