Note that there are some explanatory texts on larger screens.

plurals
  1. POCodeIgniter causes server to drop connection when redirecting to routed URLs
    text
    copied!<p>I have a CodeIgniter site which works fine locally, but now I've uploaded it to another server it breaks under a very specific condition.</p> <p>The server will drop the connection if I try and redirect to a URL that has a route in routes.php</p> <p>I.e.</p> <pre><code>$route['controller/dothis(:any)?'] = "controller/method/dothis$1"; $route['controller/dothat(:any)?'] = "controller/method/dothat$1"; </code></pre> <p>The server is running Apache, and there is no error in any of the logs, the server just drops the connection, and returns nothing to the client.</p> <p>The sequence of events is this:</p> <ol> <li>Pages loads fine</li> <li>user submits a form via POST</li> <li>The controller receives the POST request</li> <li>The controller calls redirect() to /controller/dothis/xxx</li> <li>The server drops the connection</li> </ol> <p>I'm stumped on this one, and have never seen this behaviour before.</p> <p><strong>Update:</strong></p> <p>The logs end like this:</p> <p>Access log</p> <pre><code>2.217.174.75 - - [13/Oct/2011:18:29:04 +0100] "GET /home/index/ HTTP/1.1" 200 7209 2.217.174.75 - - [13/Oct/2011:18:31:18 +0100] "POST /home/index/ HTTP/1.1" 302 68 </code></pre> <p>Rewrite log</p> <pre><code>2.217.174.75 - - [13/Oct/2011:18:31:18 +0100] [89.234.23.46/sid#2b5effefb0f0][rid#2b5ef2745340/initial/redir#1] (3) [perdir /var/www/staging/html/] applying pattern '^(.*)$' to uri 'index.php' 2.217.174.75 - - [13/Oct/2011:18:31:18 +0100] [89.234.23.46/sid#2b5effefb0f0][rid#2b5ef2745340/initial/redir#1] (1) [perdir /var/www/staging/html/] pass through /var/www/staging/html/index.php </code></pre> <p>No entries in the PHP or Apache error logs.</p> <p>As you can see, the form is submitted, a redirect is attempted (status 302) then the connection just goes away on the browser end.</p> <p>There are no entries in syslog of Apache crashing.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload