I have been having an issue with our contact forms on our GoDaddy hosted website. They have told me they have no recommendation for a fix. It seems that when we implement .htaccess rewriting to remove .php extentions, this breaks our contact forms and they wont send mail when the form is submitted. This is the htaccess code that we have that breaks the contact forms:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} mypureform\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://mypureform.com/$1 [R,L]
# hide .php extension
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]
Is there another way we can rewrite the extensions that won't break the contact forms?
Edit I have figured out that it's not working because when it tries to call on the action file ie "formhandler.php" the url gets rewritten to exclude the .php so it can't find the right file. Is there a way to exclude certain directories from having their urls rewritten?