htaccess problem after saving Settings

Ok I figured this out and I am providing answer just for the case that someone else experiences this problem.

The problem was in the plugin that was used on the original automatic installation of the WordPress done via Mojo Marketplace.

The name of the plugin was Endurance PHP Edge and it was not in the normal plugin folder so it could not been deactivated. This plugin is used in order to setup PhP version in the htaccess file after saving it. It looks like this:

    if ( ! defined( 'WPINC' ) ) { die; }

define( 'EPE_VERSION', 0.1 );

if ( ! class_exists( 'Endurance_PHP_Edge' ) ) {
    class Endurance_PHP_Edge {
        function __construct() {
            $this->hooks();
        }

        function hooks() {
            add_filter( 'mod_rewrite_rules', array( $this, 'htaccess_contents' ), 99 );
        }

        function htaccess_contents( $rules ) {
            if ( file_exists( '/opt/cpanel/ea-php70/root/usr/bin/php-cgi' ) ) {
                $default_handler="application/x-httpd-ea-php70";
            } else {
                $default_handler="application/x-httpd-php70";
            }

            $handler = get_option( 'epe_php_handler', $default_handler );
            $handler="AddHandler " . $handler . ' .php' . "\n";
            return $handler . $rules;
        }
    }
    $ebc = new Endurance_PHP_Edge;
}

and this was adding that line in my .htaccess file.

Why this line is causing every page to download is beyond my comprehension.

The solution was simply to delete mu-plugins folder which can be found inside wp-content folder.

Leave a Comment