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
-
Some links with trailing slash works, but without trailing slash shows “The connection was reset” error in Firefox.
-
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!
I believe your issue is a missing ‘?’ on this line:
Add this ‘?’ directly after ‘index.php’
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:
This is the .htaccess setup i’ve used for a while with CI and it has served me well: