jquery中post方法返回404的解决方案
$.ajax({ type: "POST", url: url, data: { confirmid : listType, sfName : sfName, slName : slName, sEmail : sEmail }, success: function(data) { var obj = $.parseJSON(data); } ); }
解决办法;
在.htaccess中,修改apache的mod_rewrite
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
补充:web前端 , JavaScript ,