Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: francisco on January 13, 2019, 11:15:33 PM

Title: 400 Bad Request
Post by: francisco on January 13, 2019, 11:15:33 PM
Hello,

I upgraded from PHP 5.6 to PHP-FPM 7.3 (with Apache 2.4.37) following the "New announcement: Wordpress - High-Performance instructions" tutorial.

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" (https://stackoverflow.com/questions/16919526/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.

This is another URL that is not working: https://www.nicaraguanpathways.com/photo-gallery/places/el-chipote/1103-notes-el-chipote.html

I tried to solve the issue by myself, but I did not got it.

I will appreciate any help you can provide me.

Thank you,

Francisco
Title: Re: 400 Bad Request
Post by: studio4host on January 14, 2019, 08:45:24 AM
simply make your own template for nginx and remove html extension from that file
http://wiki.centos-webpanel.com/webservers-vhost-templates
Title: Re: 400 Bad Request
Post by: h0bby on January 14, 2019, 06:36:18 PM
hi, i am having the same problem, whenver i try to acces .html it will gave me a bad 400 request.
Can you elobarte remove .html extension?
Title: Re: 400 Bad Request
Post by: sizenet on January 14, 2019, 07:45:29 PM
Same Problem!!!

Is there a solution???
Title: Re: 400 Bad Request
Post by: studio4host on January 15, 2019, 08:24:50 AM
cwp released a new update for centos 7 for this issue, update your cwp and rebuild webservers to get the issue fixed

sh /scripts/update_cwp
then rebuild websevers with default templates
Title: Re: 400 Bad Request
Post by: h0bby on January 15, 2019, 09:27:45 AM
yup fixed the problem finally
Title: Re: 400 Bad Request
Post by: francisco on January 15, 2019, 11:04:00 AM
Thank you so much, studio4host. It worked for me too.
Title: Re: 400 Bad Request
Post by: emad on December 15, 2023, 02:04:16 PM
How do I solve this problem? Please someone help me
http://emad-host.online/

https://a.top4top.io/p_29050b2my1.png