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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:46:55+00:00 2026-05-20T07:46:55+00:00

I am new to CodeIgniter bu I know CakePHP pretty well. If I rewrite

  • 0

I am new to CodeIgniter bu I know CakePHP pretty well.

If I rewrite the following:

test -> welcome/login
test/(:any) -> welcome/login/$1

When I write my links i want to put a link to “welcome/login/asdas” in code and to be parsed as “test/asdas”. CakePHP did that using the html link or router::url

EDIT:

What I mean is site_url(‘welcome/login/asd’) should return “test/asd”

  • 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-20T07:46:55+00:00Added an answer on May 20, 2026 at 7:46 am

    I think that this is not possible. Actually, CodeIgniter just re-route your app from one URL to other using routes defined previously by yourself in route.php

    This is the most far that you can go. site_url is an internal CodeIgniter function that returns your site URL as you specify in config.php file

    site_url()

    Returns your site URL, as specified in
    your config file
    . The index.php file
    (or whatever you have set as your site
    index_page in your config file) will
    be added to the URL, as will any URI
    segments you pass to the function.

    You are encouraged to use this
    function any time you need to generate
    a local URL so that your pages become
    more portable in the event your URL
    changes.

    Segments can be optionally passed to
    the function as a string or an array.
    Here is a string example:

    echo site_url(“news/local/123”); The
    above example would return something
    like:
    http://example.com/index.php/news/local/123

    I’ll try to study site_url function located in url_helper.php file (system/helpers/url_helper.php | Line 42) and modify it to do whatever I want.

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

Sidebar

Related Questions

I'm pretty new to codeigniter and I am trying to get to know databases
I am new to codeigniter. I want to know use of $CI =& get_instance();
I am pretty new to codeigniter. I do know php. How can I accomplish
I want send an array to my codeigniter app for deleted. I know i
I'm developing an app using Codeigniter 1.7.3 (yes, I know there's a new version,
I'm new to PHP and Codeigniter; I did a login page without using Codeigniter,
Hey I'm new to php and codeigniter. I know that in codeigniter's view you
I'm new to CodeIgniter. Previously I had developed a login script that would make
I'm new to CodeIgniter, and I need some help. I'd like to implement the
I'm new to codeigniter this is my case: I have a homepage with a

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.