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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:55:43+00:00 2026-05-27T03:55:43+00:00

For my current project in codeignitor I needed to make user profile like this

  • 0

For my current project in codeignitor I needed to make user profile like this

http://domain.com/userid

Then I tried to add this in router.php

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

Which is working fine. Now I want to make another URL for language like this

http://domain.com/es
http://domain.com/fr

As for both url uri segments are first, when I type

 http://domain.com/es

I see the page of

 http://domain.com/userid

I am using .htaccess file for removing index.php in codeignitor. Is there any help how can I achive this task in making shot url for multiple controller. Either with .htaccess or router.php?

  • 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-05-27T03:55:44+00:00Added an answer on May 27, 2026 at 3:55 am

    Because the routes system works from the top down, if you have multiple rules that can match a url, it picks the first one. So you could do:

    $route['(es|fr|en)'] = 'language/$1';
    $route['(:any)'] = 'profile/user/$1';
    

    If the first rule matches, it runs, otherwise it tests the profile rule.
    You will definitely continue running into issues though with that profile rule, and it would be easier if you did something like:

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

    That way it would be more clear what the url is doing, and it will help you for when you are writing rules in the future.

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

Sidebar

Related Questions

My current project has a development web server and live web server. Developers make
My current project has a small user base and nearly all clients will be
This current project I've been assigned uses the Version 3.1 levels of: Microsoft.Practices.EnterpriseLibrary.Common; Microsoft.Practices.EnterpriseLibrary.Data;
This is my current project structure: pom.xml /src /main /resources hibernate.cfg.xml /META-INF persistence.xml I
Current project: To make a time program in C# with two classes Time and
My current project uses JPA and HSQLDB. I would like to persist multiple related
Current project, broke head over this problem: Client Repository: public class ClientRepository { //
My current project is a form that receives input from a user. After I
My current project is in Rails. Coming from a Symfony (PHP) and Django (Python)
My current project uses NUnit for unit tests and to drive UATs written with

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.