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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:49:38+00:00 2026-06-14T00:49:38+00:00

I am building a URL shortener web site. Here is my config/routes.php file: $route[‘default_controller’]

  • 0

I am building a URL shortener web site.

Here is my config/routes.php file:

$route['default_controller'] = "main";
$route['404_override'] = '';
$route['(\w{2})/(.*)']        = '$2';
$route['(\w{2})']             = $route['default_controller'];

$route['join']                = 'main/join';
$route['activate/(:any)']     = "main/activate/$1";
$route['login']               = 'main/login';
$route['logout']              = 'main/logout';
$route['main/login']          = 'main/login';
$route['main/join']           = 'main/join';
$route['url/short']           = 'url/short';
$route['user']                = 'user/index';
$route['user/index']          = 'user/index';
$route['user/index/(:num)']   = 'user/index/$1';
$route['profile']             = 'user/profile'; 
$route['user/delete/(:any)']  = "user/delete/$1";

$route['(:any)']              = "url/go/$1";

Well, as you see, I implemented language as mentioned on CI Wiki here.

But now the last line of route is not functioning normally.

$route['(:any)']              = "url/go/$1";

For example, myshortner.com/as34v should match with above route and redirect to full URL, but instead it redirects to 0.0.0.1 ! How can I fix this?

  • 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-14T00:49:40+00:00Added an answer on June 14, 2026 at 12:49 am

    First you shoulf have a URL controller with a “go” function that takes a parameter held in $1. Make sure that exists.

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

Sidebar

Related Questions

I'm building a url shortener from an outdated guide, which has meant a lot
I am learning .net and building a site that uses url routing. I have
I am building the url in my web application and I am trying to
I'm building a site that depends on bookmarklets. These bookmarklets pull the URL and
I'm building multi-language support for PHP page. Let's say I have a page url:
When building a static HTML site, you can set the base url like so
I'm building REST web app using Netbean 7.1.1 Glassfish 3.1.2 I have 2 URL:
The url shortening service I'm building needs to display some basic click stats to
I am building an rss feed discovery service by scraping a page URL and
I'm building a simple java Servlet which passes categories using a URL variable into

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.