I have this code in HTACCESS file and it works fine as it remove .php file extension.It also allows page to load without extension.
# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymLinks -MultiViews
Options +SymLinksIfOwnerMatch -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
## hide .php extension
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]
## To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]
It works fine.The issue is when i use this 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'];
is empty/null.
I tried to remove .php from form action then it worked.But i can not remove .php from all files used in website.
For Duplicate markers:I read this post but my question is different.With me,form submites but carrying no values.