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]
Because the action
of your form is pointing to /pwreset.php
. When you try to go to that page (even via a form post), the htaccess will redirect you to /pwreset
before any PHP code runs. A redirect will drop any POST
data from the new request.
You're going to have to change all those form actions to have the non-php version. As a short term fix, try excluding POST requests from your redirect rule
RewriteCond %{REQUEST_METHOD} !POST