bander Posted January 17, 2007 Share Posted January 17, 2007 Expert?Have problems populating $_POST when RewriteRule is invoked by URL's param. When no param is given in URL, you can post the form and see the vars that are posted with print_r($_POST). If param is send in URL $_POST is empty, very strange!See the action? Take a look at he following URLs:http://test.inmo-exclusive.com/ //OK!http://test.inmo-exclusive.com/eng //NOT OK!Here is the code:.HTACCESS-----RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^([a-z]{3})$ /?lang=$1 [L]RewriteRule ^([a-z]{3})/$ /?lang=$1 [L]INDEX.PHP-----<?phpecho "Your post:";print_r($_POST);?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><form action="" method="post"> <input name="name" type="text"> <input name="submit" type="submit" id="submit" value="Submit"></form></body></html>Any help would be appreciated!! Link to comment https://forums.phpfreaks.com/topic/34622-rewriterule-blocks-form-post-_post/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.