Support » Plugin: All in One SEO – Best WordPress SEO Plugin – Easily Improve SEO Rankings & Increase Traffic » Removes everything from .htaccess file and robots.txt

  • I installed the free version and it removed all settings from htaccess for me.
    After deactivation, the file was not restored.
    If it was possible – I would put zero!

    Ups.
    Is plugin deleted all data from the file robots.txt.
    Indeed, the module earned zero points.

    Установил бесплатную версию и он мне удалил все настройки из htaccess.
    После деактивации файл не восстановил.
    Если можно было бы – поставил бы ноль!

    • This topic was modified 1 month, 2 weeks ago by michenusweb.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support wpsmort

    (@wpsmort)

    Hi @michenusweb, I can assure you that All in One SEO doesn’t touch the .htaccess file at all. The free version doesn’t write to the .htaccess and has never had code that deletes anything from that file.

    Thread Starter michenusweb

    (@michenusweb)

    ok, download the plugin, look for “htaccess” in all files of the module (free). Finding 147 results.
    Including class code
    <?php
    namespace AIOSEO\Plugin\Common\Tools;

    // Exit if accessed directly.
    if ( ! defined( ‘ABSPATH’ ) ) {
    exit;
    }

    class Htaccess {
    /**
    * The path to the .htaccess file.
    *
    * @since 4.0.0
    *
    * @var string
    */
    private $path = ”;

    /**
    * Class constructor.
    *
    * @since 4.0.0
    */
    public function __construct() {
    $this->path = ABSPATH . ‘.htaccess’;
    }

    /**
    * Get the contents of the .htaccess file.
    *
    * @since 4.0.0
    *
    * @return string The contents of the file.
    */
    public function getContents() {
    $wpfs = aioseo()->helpers->wpfs();
    if ( ! @$wpfs->exists( $this->path ) ) {
    return false;
    }

    return @$wpfs->get_contents( $this->path );
    }

    /**
    * Saves the contents of the .htaccess file.
    *
    * @since 4.0.0
    *
    * @param string $contents The contents to write.
    * @return boolean True if the file was updated.
    */
    public function saveContents( $contents ) {
    $wpfs = aioseo()->helpers->wpfs();
    $fileExists = @$wpfs->exists( $this->path );
    if ( ! $fileExists || @$wpfs->is_writable( $this->path ) ) {
    $success = @$wpfs->put_contents( $this->path, $contents );
    if ( false === $success ) {
    return false;
    }

    return true;
    }

    return false;
    }
    }`

    Thread Starter michenusweb

    (@michenusweb)

    And settings line: ‘htaccessEditor’=> true,

    Thread Starter michenusweb

    (@michenusweb)

    Ups.
    Is plugin deleted all data from the file robots.txt.
    Indeed, the module earned zero points.

    Plugin Support wpsmort

    (@wpsmort)

    Hi @michenusweb, that code doesn’t edit the .htaccess file. It is deprecated code that used to display a file editor screen in All in One SEO. But that feature was deprecated in v4.0.

    Also, we don’t touch any static robots.txt files. We have code that uses the WordPress robots_txt hook (https://developer.wordpress.org/reference/hooks/robots_txt/) so that users can easily add rules to the dynamic robots.txt that WordPress creates.

    Thread Starter michenusweb

    (@michenusweb)

    I can try to record a video, as evidence. The code above is from version 4.1.1 (3 weeks ago), the module downloaded from https://wordpress.org/plugins/all-in-one-seo-pack/
    If the free version is causing problems, it’s scary to imagine what the paid version does.

    Thread Starter michenusweb

    (@michenusweb)

    This plugin edit and remove lines in
    # BEGIN WordPress
    this – remove all lines
    # END WordPress

    Plugin Support wpsmort

    (@wpsmort)

    Hi @michenusweb, please upload a video showing exactly what’s happening. We’re not able to reproduce this at all here and no other user has reported this before.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this review.