简体   繁体   中英

CodeIgniter post functions return 404 on dev server

Moved existing codeigniter app to a new server to perform some code updates. Everything is working correctly except any method that uses POST returns 404.

For example:

function export_xls(){
   echo "HERE";
   if($this->input->post()){

I'll be able to hit the echo but it will then 404 at

$this->input->post()

I've tried changing base_url in config.php and different things in htaccess to see if that helps but nothing has proven successful.

All other functions where post values are not being called work perfectly.

Live url (where everything works) is http://admin.xxxxxx.com and dev is http://crm-admin.srv-y7z9u.xxxxxxx.com if that provides any insight.

Try to check for some issues that can get in the way.

First see if the link is being directed to the page correctly, then follow some steps that can help you:

  1. Check base_url in your project settings.
  2. Make sure you have not entered the wrong direction, as is quite common: http://crm-admin.srv-y7z9u.xxxxxxx.com/saveForm 例子

see also $.post to Codeigniter Controller/Method 404 Page Not Found

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM