1

I am getting this error (ERR_EMPTY_RESPONSE) for a site build in codeigniter. The error goes automatically and site works fine but then appears after some time.

I hosted the same site on another host it is working fine. Why is the error coming.

The bigrock support says it is because of the htaccess file. I am not getting where the issue is with the file

Following is my htaccess file content

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

I am trying to solve this issue from last week please help on how to get it fixed

alariva
  • 2,051
  • 1
  • 22
  • 37
san
  • 237
  • 7
  • 19
  • Did you check http://stackoverflow.com/questions/5863238/error-324-neterr-empty-response-i-cant-getting-my-site-from-some-machines ? – alariva Nov 14 '16 at 15:13
  • yea.. but the issue comes on firefox also, on firefox it says 'The connection to the server was reset while the page was loading.'.. – san Nov 15 '16 at 05:15
  • If I comment the htaccess file the error goes can someone please help me out. The site is on shared hosting may be the htaccess in the root folder is conflicting with the one in the project subfolder, how do I deal with the conflict.. – san Nov 16 '16 at 04:01
  • What do you mean by the problem goes? It works, but no clean urls? How many shared projects do you have under the same root dir? Are all of them in codeigniter? Please explain as much detail as possible, it looks like there is lot of info missing about the problem. – alariva Nov 16 '16 at 04:29
  • yes The problem goes but no clean url. There are around 5-6 shared projects. Some are in wordpress and some in codeigniter. The url http://example.net/ has a wordpress site . http://example.net/ci_project is the site which is in codeigniter and causing isssue – san Nov 16 '16 at 04:44
  • There is one htaccess file in the example.com and another htaccess file is in example.com/ci_project . – san Nov 16 '16 at 04:56
  • Is there any htaccess file in the root directory? – alariva Nov 16 '16 at 05:01
  • yes there is an htaccess file in the root – san Nov 16 '16 at 05:05
  • Can you pastebin the contents of it? What happens if you disable it? How is the current root directory listing (and which application is for each)? – alariva Nov 16 '16 at 05:08
  • # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress It does not make any difference if i comment this – san Nov 16 '16 at 05:15
  • Please use pastebin service for sharing file contents. It looks like your root htaccess is messing with your CI app. You are mixing projects scopes. – alariva Nov 16 '16 at 05:17
  • I do not have a pastebin account sorry.. ill share the code again – san Nov 16 '16 at 05:43
  • # BEGIN WordPress * * RewriteEngine On * RewriteBase / * RewriteRule ^index\.php$ - [L] * RewriteCond %{REQUEST_FILENAME} !-f * RewriteCond %{REQUEST_FILENAME} !-d * RewriteRule . /index.php [L] * * # END WordPress * – san Nov 16 '16 at 05:43
  • i have put a star @ end of each line – san Nov 16 '16 at 05:45
  • You dont need to have an account on pastebin. You have a root dir, with many projects, each with their own htaccess. But on the root dir, you have an htaccess of a wordpress that is interpreted before reaching your CI path. You need to remove that root htaccess. Also get know that sharing these type of projects under the same host can get tricky. – alariva Nov 16 '16 at 05:48
  • Ook Is there any way where in I can define the scope of the project so that it is directed to the respective project ? – san Nov 16 '16 at 05:55
  • Remove the root htaccess file, then you access each project by their /directory – alariva Nov 16 '16 at 05:56
  • i cant remove the file Tried http://wordpress.stackexchange.com/questions/20152/cannot-access-non-wordpress-subdirectories-as-wordpress-overrides-them-with-a-40 http://wordpress.stackexchange.com/questions/8536/wordpress-htaccess-subdirectory-problem/246344#246344 http://stackoverflow.com/questions/1521969/how-can-i-disable-rewriterule-for-one-subcategory No luck.. – san Nov 16 '16 at 09:24
  • Yes, you will have to consider not mixing projects that much. Maybe there is a directive for ignoring the CI path from the htaccess, but that -if possible- would be a very bad practice and bring problems in the future for sure. – alariva Nov 16 '16 at 11:26
  • Try checking [this question](http://stackoverflow.com/questions/22894839/codeigniter-at-subfolder-and-htaccess-for-inner-redirection) and specially [this other question](http://stackoverflow.com/questions/9482108/wordpress-codeigniter-htaccess-confusing) – alariva Nov 16 '16 at 13:53

0 Answers0