php - Website Form do not carry any value when .htaccess File Extension Remover Code is Used -


i have code in htaccess file , works fine remove .php file extension.it allows page load without extension.

# security reasons, option followsymlinks cannot overridden. #options +followsymlinks -multiviews options +symlinksifownermatch -multiviews # turn mod_rewrite on rewriteengine on rewritebase /  ## hide .php extension # externally redirect /dir/foo.php /dir/foo rewritecond %{the_request} ^[a-z]{3,}\s([^.]+)\.php [nc] rewriterule ^ %1 [r,l,nc]  ## internally redirect /dir/foo /dir/foo.php rewritecond %{request_filename}.php -f rewriterule ^ %{request_uri}.php [l] 

it works fine.the issue when use code

<form action="test.php" method="post" id="myform" name="myform"> <input type="text"  name="username"> <input type="submit" value="login"> </form> 

on test.php echo $_request['username']; empty/null.

i tried remove .php form action worked.but can not remove .php files used in website.

for duplicate markers:i read post question different.with me,form submites carrying no values.

insert rule below rewritebase line avoid redirecting post requests:

rewritecond %{request_method} post rewriterule ^ - [l] 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -