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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:26:05+00:00 2026-05-11T15:26:05+00:00

Can anyone tell me why my redirect helper does not work the way I’d

  • 0

Can anyone tell me why my redirect helper does not work the way I’d expect it to?

I’m trying to redirect to the index method of my main controller, but it takes me www.example.com/index/provider1/ when it should route to www.example.com/provider1. Does this make sense to anyone? I have index page in config set to blank, although I don’t think that it is the issue.

Does anyone have advice on how to fix this issue?

Controller:

if($provider == '') {     redirect('/index/provider1/', 'location'); } 

.htaccess:

RewriteEngine on  RewriteCond %{REQUEST_URI} !^(index\.php|files|images|js|css|robots\.txt|favicon\.ico)  RewriteCond %{HTTP_HOST} ^example.com/ttnf/ RewriteRule (.*) http://www.example.com/ttnf/$1 [R=301,L]  RewriteBase /ttnf/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L]  php_flag display_errors On 
  • 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. 2026-05-11T15:26:06+00:00Added an answer on May 11, 2026 at 3:26 pm

    redirect()

    URL Helper


    The redirect statement in code igniter sends the user to the specified web page using a redirect header statement.

    This statement resides in the URL helper which is loaded in the following way:

    $this->load->helper('url'); 

    The redirect function loads a local URI specified in the first parameter of the function call and built using the options specified in your config file.

    The second parameter allows the developer to use different HTTP commands to perform the redirect ‘location’ or ‘refresh’.

    According to the Code Igniter documentation: ‘Location is faster, but on Windows servers it can sometimes be a problem.’

    Example:

    if ($user_logged_in === FALSE) {      redirect('/account/login', 'refresh'); } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me why this code would not be working? $('body').on('test', function() {
Can anyone tell why my jQuery script is not loading here <?php wp_enqueue_script(jquery); ?>
can anyone tell me how to select data by date in MS.ACCESS database using
Can anyone tell me why the following code fails to submit the form into
Can anyone tell me how I can correctly pass my application context to my
Can anyone tell me how to identify a particular background process (i.e., Already running
Can anyone tell me, how to make shadow, using UIPageViewController, around of my background
Can anyone tell me how to substring a GridView BoundField object please? I tried
Can anyone tell me if I can (in the command line) issue a POST
Can anyone tell me how to call the n number of activities from different

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.