I\'ve added this .htaccess to remove file extension from the URL, so instead \"index.php\", it would show \"index\" only, all the times. But after I did it, my
This is happening because you are redirecting here:
## 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]
When you redirect, the request BODY doesn't always get included, you can try adding an exception for POST:
## hide .php extension
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{REQUEST_METHOD} !POST [NC]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]