WordPress.org

Ready to get started?Download WordPress

Forums

Yoast rewrites .htaccess -> shuts down php 5.3 (6 posts)

  1. Edo Dijkgraaf
    Member
    Posted 2 years ago #

    About: http://www.zeebrieshoekvanholland.nl

    Hi there,

    One of our local beachcafes needs a new website. I thought it would be nice to use the Background Manager plugin to show the place. The plugin needs php 5.3.

    My host, Versio, only let's me use php 5.3 if I put this code in the .htaccess:

    <FilesMatch "\.php$">
    
    AddHandler x-httpd-php53 .php
    
    </FilesMatch>

    My favorite SEO plugin is Yoast WordPress SEO. Today I updated to 1.2.4. To the people who are not familiair with the plugin: get to know it and you'll be friends forever.

    One problem. The plugin rewrites the .htaccess, the moment one activates the XML-sitemaps. At the same time it deactivates the Background Manager plugin.

    What can I do? I am a bit nervous to chmod the .htaccess to 664, but maybe that is the solution.

    Your answers are appreciated.

  2. myatu
    Member
    Posted 2 years ago #

    Hi!

    It only appears to be the case for what within the # BEGIN WordPress and # END WordPress section (so I would attribute this to WordPress, not Yoast's excellent plugin). Placing it outside this should keep it from being removed, ie:

    AddHandler x-httpd-php53 .php
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Hope this solves the issue! :)

  3. Edo Dijkgraaf
    Member
    Posted 2 years ago #

    Thanks!

    If I put the line AddHandler x-httpd-php53 .php above, Yoast leaves it untouched. Unfortunately php 5.3 does not work either. Another issue is born if I only put the one line above. The XML-sitemaps don't work.

    I think I'd better start searching for another background plugin. One that will work with 5.2. Just like you I like the plugin by Yoast to much to get rid of it.

    If only the host would do his work properly...

  4. Edo Dijkgraaf
    Member
    Posted 2 years ago #

    Dear Myatu,

    After I tried several plugins, it seems Background Manager was the best. Are you sure I should only paste AddHandler x-httpd-php53 .php in front of the rest?

    It would be great if this problem is history.

  5. myatu
    Member
    Posted 2 years ago #

    Hoi!

    It should be the only thing that needs to be added (though you can still wrap it in the FilesMatch wrapper, as in Versio's own example).

    You could verify PHP 5.3 is running with a small PHP file, ie test.php:

    <?php phpinfo();
  6. Edo Dijkgraaf
    Member
    Posted 2 years ago #

    This becomes a never ending story.

    I add the lines:

    <FilesMatch "\.php$">
    
    AddHandler x-httpd-php53 .php
    
    </FilesMatch>

    I do this above the code as you suggested.
    >
    After I do this, I activate the Background Manager plugin.
    >
    Then I check my Yoast xml sitemaps. They have disappeared.
    >
    So I activate my xml sitemaps, but they no longer appear.

    I am getting to old for this peeeeeeep!

Topic Closed

This topic has been closed to new replies.

About this Topic