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

  • SEARCH
  • Home
  • 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 9311807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:27:56+00:00 2026-06-19T01:27:56+00:00

I am using Codeigniter and Tank Auth and I am using Ubuntu OS. When

  • 0

I am using Codeigniter and Tank Auth and I am using Ubuntu OS. When I access my project using my IP, it comes something like:

http://192.168.1.10/project/auth/login

I have to implement a functionality of searching a profile using URL. Suppose if I enter

http://192.168.1.10/project/vishmay

Then it should show my profile. Can anyone tell me how to do it?

I have tried doing this in my routes.php

$route['default_controller'] = "welcome";
$route['auth/login'] = 'auth/login';
$route['auth/register'] = 'auth/register';
$route['auth/logout'] = 'auth/logout';
$route['welcome/profile'] = 'welcome/profile';
$route[':any'] = 'auth/index/$1';

and also made index() in auth.php controller like

 function index() {
        $username=$this->uri->segment(1);
        $data['result']=$this->users->get_profile_pic1($username);   
        if ($message = $this->session->flashdata('message')) {
            $data['reg_success'] = "You have been registered successfully.";
            $reg_success = 1;
            redirect('/auth/register', $data);
        } else {
            redirect('/auth/login/');
        }
    }
  • 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-19T01:27:58+00:00Added an answer on June 19, 2026 at 1:27 am

    You should change:

    $route[':any'] = 'auth/index/$1';
    

    to

    $route['(:any)'] = 'auth/index/$1';
    

    to make the $1 can correctly get the segment value.

    And you can try this code:

    Try this:

    function index($username = '') {
        $data['result']=$this->users->get_profile_pic1($username);   
        if ($message = $this->session->flashdata('message')) {
            $data['reg_success'] = "You have been registered successfully.";
            $reg_success = 1;
            redirect('/auth/register', $data);
        } else {
            redirect('/auth/login/');
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Tank Auth for Codeigniter to facilitate user registration and login. Problem:
I've started using Tank Auth in my CodeIgniter App, I have followed some tutorial
I'm using Codeigniter framework to create my web application. I have a login form
I am using Codeigniter PHP Framework with Tank Auth authentication library. In my config
I am using CodeIgniter framework. I have files in my controllers folder like this:
I am using the Tank Auth library for CodeIgniter. When a user is registered,
I am using CodeIgniter and I have two different controllers - login.php and site.php
i am using codeigniter. i have class Orders which with some methods like start_order(),
I'm using Codeigniter and Tank Auth for a e-commerce website. I'm finding that if
I am using Tank Auth authentication library with Codeigniter 2.0.3 (one version before the

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.