1

I upgraded from PHP 5.6 to PHP-FPM 7.3 (with Apache 2.4.37). I am using CentOS Web Panel installation. Everything was working fine before this upgrade.

The major of my sites are running fine after this upgrade, but the sites that have a URL format with ".html" at the end of the URL are showing a "400 Bad Request: Your browser sent a request that this server could not understand.":

The URL with ".html" (as it was configured in Permalinks in WordPress) is not working: https://www.delepesoasuspesos.com/ahorro-e-inversion/1850-construir-en-tiempos-de-crisis.html Then I changed the permalink in WordPress without using ".html": https://www.delepesoasuspesos.com/ahorro-e-inversion/1850-construir-en-tiempos-de-crisis and it worked.

But what I need is to keep the permalink with ".html" in order to not affect the traffic and SEO. I tried to use a .htaccess redirect the URL to the same URL omitting the ".html" (How to link to pages without the .html extension?), but it did not work I think because the 400 bad request error appears first and then the .htaccess does not run.

I will appreciate any help you can provide me.

francisco
  • 11
  • 1
  • It seems there is an issue with your htaccess file. Because replacing `.html` with `.php` is working fine. https://www.delepesoasuspesos.com/ahorro-e-inversion/1850-construir-en-tiempos-de-crisis.php – M A Jan 14 '19 at 04:01
  • The .htaccess file has the default WordPress rules: '# BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress' The problem is that every indexed URL page in Google Search has the .html. – francisco Jan 14 '19 at 04:06
  • Finally found a solution here: http://forum.centos-webpanel.com/centos-7-problems/400-bad-request/ – francisco Jan 15 '19 at 11:05

0 Answers0