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 8394661
In Process

The Archive Base Latest Questions

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

I am putting together a simple networking site and would like to have the

  • 0

I am putting together a simple networking site and would like to have the urls work similar to facebook so by typing in domain.com/username I would get a user profile. I can do this already this way

Logged in users profile at

domain.com/

other users profile at

domain.com/home/username

The default controller is called home and I am currently using the _remap function to check for extra url parameters to display different data based on what is or isn’t passed.

My question is how would I map this out so I can access user profiles by:

domain.com/username 

Is there a routes.php setting I could use? htaccess?

  • 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-09T20:07:00+00:00Added an answer on June 9, 2026 at 8:07 pm

    you should add the following rule in your config/routes.php

    // Profile Route
    $route['(:any)'] = 'home/$1';
    

    this will reroute all your request to the home controller.

    so domain/michelle will re be rerouted as domain/home/michelle
    but in this case all your requests will be rerouted to the home controller
    eg. domain/pages/about will also be rerouted to domain/home/pages/about wich false.

    domain/michelle => domain/home/michelle // TRUE
    domain/pages/about => domain/home/pages/about // FALSE
    

    so you MUST add for each request a identic rule before the Profile Route,
    eg. $route['pages/(:any)'] = 'pages/$1';

    put it all together :

    // Page Route 
    $route['pages/(:any)']  = 'pages/$1'
    
    // Last Profile Route
    $route['(:any)'] = 'home/$1';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm putting together a simple portfolio site in middleman. I'm generate the 'work' pages
Facebook Connect I have spent a few weeks putting together a basic web site
I'm putting together a simple search engine for a small site. Users will be
I want to make a simple assistant for putting together AviSynth scripts. This would
I have a problem with a website I'm putting together. I have a simple
I'm working on a quick captcha generator for a simple site I'm putting together,
So I am putting together a very simple app and have got a bit
I'm putting together a simple test made up of two tutorials available online for
I'm putting together a simple test database to learn MVC with. I want to
I am putting together a fairly simple web app that uses user inputted data

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.