Forms not working after adding .htaccess rule
Posted: Tue Jun 25, 2019 12:34 am
Hello there,
Just wanted to check if anyone else have experienced the same issue of forms not working soon after adding the code to hide .html and .php page extensions inside the .htaccess file?
Not sure if there's a correlation between the two; .htaccess rule scrip and the contact forms behaviour. Inside the form; " use built-in PHP from processor script" was selected. The code hid the page extensions with no other issues other than the forms not working.
Any reasons, ideas, tips, hints, suggestions are all welcome.
Here's the code:
RewriteEngine On
RewriteCond %{HTTP_HOST} labourhub\.com\.au [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://labourhub.com.au/$1 [R,L]
RewriteEngine On
RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [NC,L]
RewriteEngine On
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]
Just wanted to check if anyone else have experienced the same issue of forms not working soon after adding the code to hide .html and .php page extensions inside the .htaccess file?
Not sure if there's a correlation between the two; .htaccess rule scrip and the contact forms behaviour. Inside the form; " use built-in PHP from processor script" was selected. The code hid the page extensions with no other issues other than the forms not working.
Any reasons, ideas, tips, hints, suggestions are all welcome.
Here's the code:
RewriteEngine On
RewriteCond %{HTTP_HOST} labourhub\.com\.au [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://labourhub.com.au/$1 [R,L]
RewriteEngine On
RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [NC,L]
RewriteEngine On
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]