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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:15:39+00:00 2026-06-13T03:15:39+00:00

Is it possible to create such urls in codeigniter? http://site.com/shorturl/ Where shorturl isn’t a

  • 0

Is it possible to create such urls in codeigniter?
http://site.com/shorturl/

Where shorturl isn’t a physical controller file, but a variable.

I expect the algorythm for parsing url query to be like this:
1) Search for physical controller file. If exists, do standard codeigniter routine. If not
2) Try to load special controller file, where “shorturl” is a variable. Do further stuff inside that controller.

Thanks in advance

  • 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-13T03:15:41+00:00Added an answer on June 13, 2026 at 3:15 am

    The previous answer seems quite good, but thought I’d share what I’d though of.

    If you set your 404_override to point to a controller you have set up as follows:

    $route['404_override'] = 'welcome/short';
    

    Any URL that doesn’t exist (any short URL for example) would get sent there, where you could do the following to check the value:

    public function short() {
    
        $shortCode = $this->uri->segment(1);
    
    }
    

    That would give you the value you need to check. If all is well, do the redirect, if the code doesn’t exist, you can then use the show_404 method to actually show the 404 page.

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

Sidebar

Related Questions

MvcSiteMap - https://github.com/maartenba/MvcSiteMapProvider [originally at: http://mvcsitemap.codeplex.com/] Is it possible to create such links in
Is it possible to create HTML lists such as ordered and unordered lists without
Is it possible to create virtual files (such as /proc/uptime for exanple) in java?
Is it possible to create an object from a dictionary in python in such
Is it possible to create a regular expression that matches a comparison such as
Is it possible to create a driver (windows/mac) for a custom usb hub such
Is it possible and how to create objects of such classes like NSString from
As it is MyClass x = 120; , is it possible to create such
Is it possible to create URLs direct to items on the Apple iTunes store
I have an application with URLs such as these: https://www.domain.com/example/public/subscription https://www.domain.com/example/public/subscription/source https://www.domain.com/example/public/test/subscription I'd like

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.