• Hi.

    I’m wondering if someone could help me with disabling anything that has to do with rss feeds through .htaccess rules.

    I currently use the following ones, but they are not the most elegant solution:

    RewriteCond %{QUERY_STRING}     feed=(rss|rss2|atom).*                               [NC]
    RewriteRule ^(.*)$              http://www.domain.tld                           [G,NC]
    RewriteCond %{QUERY_STRING}     feed=(comments\-rss|comments\-rss2|comments\-atom).* [NC]
    RewriteRule ^(.*)$              http://www.domain.tld                           [G,NC]
    RewriteCond %{QUERY_STRING}     feed                                                 [NC]
    RewriteRule ^(.*)$              http://www.domain.tld                           [G,NC]
    
    RewriteRule ^wp-includes/feed-rss2-comments.php$ http://www.domain.tld[R,L]
    RewriteRule ^wp-includes/feed-rss2.php$ http://www.domain.tld[R,L]
    RewriteRule ^wp-includes/rss-functions.php$ http://www.domain.tld[R,L]
    RewriteRule ^wp-includes/rss.php$ http://www.domain.tld[R,L]
    RewriteRule ^wp-includes/feed-rss.php$ http://www.domain.tld[R,L]
    RewriteRule ^wp-includes/images/rss-2x.png$ http://www.domain.tld[R,L]
    RewriteRule ^wp-includes/images/rss.png$ http://www.domain.tld[R,L]

    Feedback would be appreciated 🙂

    Thx,
    /mysteron

  • The topic ‘How to disable anything with related with feeds through .htaccess?’ is closed to new replies.