php - Unwanted redirect with form submit -
i transfered codeigniter proejct wamp server free speech server , have been experiencing weird issues. i'm using mod_rewrite found online remove infamous 'index.php' url, , think causing redirect when submit form, losing post data.
here htaccess file:
<ifmodule mod_rewrite.c> rewriteengine on rewritebase / 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>
in script form calling, checking see if there post data. if there no post data, redirect 404 error (this prevent people calling script via url). after uploading site, getting 404 errors every form submit, suggesting there no data being sent. however, debug purposes, removed code script , discovered submitting form loads blank page. since form isn't supposed load new page, suggests script redirecting itself, losing post data , meeting post data test , redirecting 404.
any ideas on why redirect happening? really important, , i'll grateful suggestions!
thanks
looks server doesn't have mod_rewrite enabled.
try remove ifmodule mod_rewrite.c , ifmodule tags see if internal server error..
hashem qolami right theres no redirect flag codeigniter router redirecting...
Comments
Post a Comment