Yoast WordPress SEO and XML Sitemaps

Home Forums BulletProof Security Free Yoast WordPress SEO and XML Sitemaps

This topic contains 9 replies, has 2 voices, and was last updated by  AITpro Admin 4 years, 6 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #11441

    Bruce Alfred
    Participant

    I’ve got a conflict between Yoast WordPRess SEO and BPS such that the Yoast XML Sitemaps are giving me an error when I try to access them.

    “Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype: piepho.com/main-sitemap.xsl”

    I Deactivate Root Folder BulletProof Mode the Yoast WordPress XML Sitemaps loaded as they should.

    After doing a little research, I found that others were having the same problem, and it involved their .htaccess file. On the WordPress forums, I learned that the below code should fix the issue. Since I don’t want to enter  this code in the wrong area and bring down my site, can you please tell me which section of the  BPS .htacess custom code area it should be entered in?

    Thanks very much!

    AddType application/xml atom rdf rss xml
    AddType text/xsl xsl
    
    <Files "xml-sitemap-xsl.php">
    Allow from all
    </Files>
    #11443

    AITpro Admin
    Keymaster

    Since this is a php handler you would add it in this Custom Code text box:  

    After adding/copying and pasting your custom code:  click the Save Root Custom Code button, go to the BPS Security Modes page and click the Root Folder BulletProof Mode Activate button.

    Your code would go above any other code that you already have in this Custom Code text with the exception of a php.ini handler.

    The order should be:
    php.ini handler
    other php handlers (your php handler code in this case)
    plugin caching code (if you have a caching plugin that creates .htaccess code)
    BPS Speed Boost Cache code (if you are using the Speed Boost Cache Bonus code)

    #11446

    Bruce Alfred
    Participant

    Hi,

    Thanks so much for the quick response. I went ahead and added the code (pasted below again, for your reference since the top line or two was lost last time) as you instructed. Unfortunately, it did not work — meaning the xml sitemaps still would not load. Wben I activate Root Folder BulletProof Mode,  the xml sitemap loads fine. Can you tell me what I need to do to get the xml sitemap to load when BPS is turned on?

    The site is piepho.com and the sitemaps are here: http://piepho.com/sitemap_index.xml

    Thanks very much.

    <IfModule mod_mime.c> 
    AddType application/xml atom rdf rss xml 
    AddType text/xsl xsl 
    </IfModule> 
    
    <Files "xml-sitemap-xsl.php"> 
    Allow from all 
    </Files>
    #11447

    AITpro Admin
    Keymaster

    Post the error in your BPS Security Log that is related to this.  Please only post the error related to the sitemap.

    #11483

    Bruce Alfred
    Participant

    Hi,

    I’m actually not getting an error message in BPS. I’m getting this message when I try to access my sitemaps:

    “Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype: piepho.com/main-sitemap.xsl”

    When I deactivate Root Folder BulletProof Mode, I don’t get the error, and am able to access the sitemaps. Can you please tell me what I need to do to allow the Yoast WordPress SEO to access htaccess so that the sitemap can be generated when BPS is in security mode.

    Thanks.

    #11489

    AITpro Admin
    Keymaster

    I cannot think of anything in the BPS .htaccess code that would block this.  No one has ever reported this problem before.  So are you using any custom .htaccess code in the BPS Custom Code text boxes?  If so, copy it to a Notepad text doc on your computer to save it and then delete any/all custom code in all of the BPS Custom Code text boxes and save your changes – all BPS Custom Code text boxes should be blank/empty.  Then click the Save Root Custom Code button, go to the BPS Security Modes page and click the Root Folder BulletProof Mode Activate button.

    Is the problem still occurring at this point?

    It is possible, but not likely that the BPS Brute Force Login protection Bonus code will block the XSLT stylesheet due to the version being 1.0.  If you are using the BPS Brute Force Login protection Bonus custom code then delete it and test.

    #11513

    Bruce Alfred
    Participant

    You are correct. The problem came in my custom code for Redirect Matches. Once I removed it,  Yoast was able to return the XML sitemaps as it should.

    I would very much appreciate  if you could please take a look at the below code I had in BPS, and see if you can spot what is causing the conflict? I need these redirect matches, but don’t know what I did that is causing the issue.

    Here’s what I had in the “Custom Code Top” area:

    Options +FollowSymlinks
    RewriteEngine on
    RedirectMatch 301 ^/locations/mankato-mn-mover(.*)$ http://piepho.com/
    RedirectMatch 301 ^/main(.*)$ http://piepho.com/moving-services/university-of-wisconsin-moving-services/
    RedirectMatch 301 ^/locations/rochester-mn-mover(.*)$ http://piepho.com/
    RedirectMatch 301 ^/locations/eagan-mn-mover(.*)$ http://piepho.com/
    RedirectMatch 301 ^/locations/onalaska-wi-mover(.*)$ http://piepho.com/
    RedirectMatch 301 ^/company-news/girl-scout-cookie-deliveries(.*)$ http://piepho.com/blog/
    RedirectMatch 301 ^/blog/company-news/girl-scout-cookie-deliveries(.*)$ http://piepho.com/blog/
    RedirectMatch 301 ^/corporate-moves/university-of-wisconsin(.*)$ http://piepho.com/moving-services/university-of-wisconsin-moving-services/
    RedirectMatch 301 ^/blog/company-news(.*)$ http://piepho.com/blog/
    RedirectMatch 301 ^/about/testimonials(.*)$ http://piepho.com/about/customer-reviews/
    RedirectMatch 301 ^/locations(.*)$ http://piepho.com/about/contact/

    Thanks very much,

    Bruce

    #11515

    AITpro Admin
    Keymaster

    You don’t need this code and should delete it:

    Options +FollowSymlinks
    RewriteEngine on

    And your RedirectMatch code goes in this Custom Code text box: 

    You will need to go through your RedirectMatch custom code rules and check each one individually to find the problem.  I cannot do this for you.

    #11518

    Bruce Alfred
    Participant

    Thanks for the information. That is exactly what I needed! I made those changes, updated my RedirectMatch custom code rules, and it is now working as it should. Really appreciate the help. In fact, I appreciate it so much, I’m going to buy the Pro version right now!

    Thanks again,
    Bruce

    #11519

    AITpro Admin
    Keymaster

    Great!  Thanks for confirming that did the trick.  This will help other folks who run into this issue/problem.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.