Author Topic: ModSecurity adds index.php in permalinks  (Read 47056 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Re: ModSecurity adds index.php in permalinks
« Reply #30 on: September 20, 2018, 11:14:37 AM »
Hi guys,

Code: [Select]
sed -i 's|.*SecServerSignature "CentOS WebPanel: Protected by Mod Security".*||g' /usr/local/apache/conf.d/mod_security.conf
service httpd restart

The above code fixed my problem. Htaccess is now being written by Wordpress. Many thanks for the tip!

Offline
*
Re: ModSecurity adds index.php in permalinks
« Reply #31 on: July 28, 2019, 01:31:22 PM »
Yes, i confirm that this solves the issue with the index.php. Thank you!

The issue is caused because of SecServerSignature in /usr/local/apache/conf.d/mod_security.conf

You can manually goto /usr/local/apache/conf.d/mod_security.conf and remove it

Code: [Select]
nano /usr/local/apache/conf.d/mod_security.conf
Find

Code: [Select]
SecServerSignature "CentOS WebPanel: Protected by Mod Security"
remove the above line and then restart apache

Code: [Select]
service httpd restart
Or else you can run

Code: [Select]
sed -i 's|.*SecServerSignature.*||g' /usr/local/apache/conf.d/mod_security.conf
service httpd restart