POST not working after rewrite .htaccess -


my forms not working after adding rewrite .htaccess. found many topics similar problem neither have solution issue. grateful if take look. there is:

rewriteengine on rewritebase / rewritecond %{the_request} ^[a-z]{3,}\s([^.]+)\.php [nc] rewriterule ^ %1 [r=301,l] rewritecond %{request_filename} !-d rewritecond %{request_filename}.php -f rewriterule ^(.*?)/?$ $1.php [nc,l] 

and here post code:)

<?php function send_email ($to_email, $from_email, $from_name, $subject, $msg, $showinfo) { //split email array, if given if (is_array($to_email)) {     $to_email_string = implode(', ', $to_email); } else {     $to_email_string = $to_email; }  // build content  $message = '<html><body>'; $message .= '<table rules="all" style="border-color: #666;"   cellpadding="10">'; $message .= "<tr style='background: #eee;'><td><strong>imie nazwisko:   </strong> </td><td>" . strip_tags( $from_name ) . "</td></tr>"; $message .= "<tr><td><strong>e-mail:</strong> </td><td>" . strip_tags(  $from_email ) . "</td></tr>"; $message .= "<tr><td><strong>temat:</strong> </td><td>" . strip_tags(  $subject ) . "</td></tr>"; $message .= "<tr><td><strong>wiadomość:</strong> </td><td>" . nl2br(  strip_tags( $msg ) ) . "</td></tr>"; $message .= "</table>"; $message .= "</body></html>";    //assemble headers $headers  = 'mime-version: 1.0' . "\r\n"; $headers .= 'content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "from: $from_name <$from_email>" . "\r\n";  //send via php's mail() function if( $showinfo ) {     mail($to_email_string, $subject, $message, $headers) or die(json_encode( array( 'error' => true, 'msg' => 'fel när du skickar meddelanden.')));     echo json_encode( array( 'error' => false, 'msg' => "ditt meddelande har skickats.")); } else {     mail($to_email_string, $subject, $message, $headers); }    }   if( isset( $_post['name']) && isset( $_post['email']) && isset(    $_post['subject']) && isset( $_post['message']) && $_post['other'] == '') {  send_email( "myemail", $_post['email'], $_post['name'],  $_post['subject'], $_post['message'], true ); send_email( $_post['email'], 'myemail', "lhi", 'copy: ' .    $_post['subject'], $_post['message'], false ); }  if( isset( $_post['info']) && $_post['info'] == 'notajax' ) { header("http/1.1 301 moved permanently");  header("location: http://localhost/dash/");  } 

thank help.

perhaps need remove .php in

rewritecond %{request_filename}.php -f 

is there error message when load page?


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -