CodeIgniter Forums
Only POST Request routes wrong URL, all other requests OK - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Only POST Request routes wrong URL, all other requests OK (/showthread.php?tid=58261)



Only POST Request routes wrong URL, all other requests OK - El Forum - 05-28-2013

[eluser]Unknown[/eluser]
Hoping someone can help with this issue. I'm creating a web app using Codeigniter as the PHP framework and everything works great running MAMP and hosting locally. When I pushed to my production server on EC2 however, some problems started popping up:

ONLY POST requests route to the wrong URL. I get a bunch of server 500 errors and 404 cannot be found errors in my log files. Specifically they seem to be missing the base URL (the log file states: File does not exist: /var/www/alpha. It SHOULD be routing to /var/www/application/controllers/alpha. I can't figure out why this is happening and it ONLY seems to occur on POST request. All other routing works fine.

Preemptive answers to possible questions. Base URL is already site with the entire absolute string. I've included my HT access below as well. Mod rewrite is already enabled on my server as well.

Code:
$config['base_url'] = "http://www.mysite.com/";

Code:
<IfModule mod_rewrite.c>

RewriteEngine On

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>
ErrorDocument 404 /index.php