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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:22:01+00:00 2026-06-17T00:22:01+00:00

I m having strange problem. I have a Codeigniter application which perfectly works fine

  • 0

I m having strange problem. I have a Codeigniter application which perfectly works fine in my local machine, but in remote server it doesnot. Following are the scenarios

  1. Some links with trailing slash works, but without trailing slash shows “The connection was reset” error in Firefox.

  2. Some links WITHOUT trailing slash works, but WITH trailing slash shows “The connection was reset” error in Firefox.

I m sure there is no error in coding because. All I think the culprit is .htaccess file.
Following is my .htaccess file

RewriteEngine on
RewriteBase /demo/
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

Any help will be highly appreciated. Thanks!

  • 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-17T00:22:02+00:00Added an answer on June 17, 2026 at 12:22 am

    I believe your issue is a missing ‘?’ on this line:

    RewriteRule ^(.*)$ index.php/$1 [L,QSA]
    

    Add this ‘?’ directly after ‘index.php’

    RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
    

    Also, in my experience I would leave off the trailing slash on RewriteBase and add it to the $config[‘base_url’] parameter and let CI do that work for you instead:

    $config['base_url'] = 'http://yourwebsite.com/demo/';
    -instead of-
    $config['base_url'] = 'http://yourwebsite.com/demo';
    

    This is the .htaccess setup i’ve used for a while with CI and it has served me well:

    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase / # TODO: add a folder name here if the application is not in web root
    
      RewriteCond %{REQUEST_URI} ^system.*
      RewriteRule ^(.*)$ /index.php?/$1 [L]
    
      RewriteCond %{REQUEST_URI} ^application.*
      RewriteRule ^(.*)$ /index.php?/$1 [L]
    
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?/$1 [L]
    </IfModule>
    
    <IfModule !mod_rewrite.c>
      # If we don't have mod_rewrite installed, all 404's
      # can be sent to index.php, and everything works as normal.
      # Submitted by: ElliotHaughin
    
      ErrorDocument 404 /index.php
    </IfModule> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well I m having strange problem here. I have a codeigniter 2 web application
I'm having a strange problem. I have a HTML page with PHP code which
I am having a strange problem which I don't understand. I have the following
I am having a strange problem. I have a function which returns a large
I'm having a strange problem with Android 1.6 I have an application that has
I am having a strange problem. I have an external style sheet in which
I'm having a strange problem here... I have an ASP.NET 3.5 application that has
I have a CodeIgniter app that works on one server (IIS 6) just fine.
I'm having a strange problem in that I have php inserting text into a
Im having a very strange problem, i have a complicated view that returns incorrect

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.