Forums

htaccess, feedburner, and permalinks (1 post)

  1. number65
    Member
    Posted 3 months ago #

    I have permalinks setup in the way of /category/post-id/post-name but I'd also like to have HTACCESS (and not FeedSmith) forward my main and comment feeds to Feedburner, but I can't get this working. Anyone have any suggestions?

    Here's what my .HTACCESS FILE looks like, but the only thing that works is the permalinks.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress
    
    # Redirect global post and comment feeds to Feedburner without loading WP
    RewriteCond %{REQUEST_URI} ^/(feed|wp-atom|wp-feed|wp-rss|wp-rdf).* [NC,OR]
    RewriteCond %{QUERY_STRING} .*feed=.* [NC]
    
    # Ditch if they want a comment feed or a feed limited to posts with comments
    RewriteCond %{QUERY_STRING} !.*withcomments=.* [NC]
    
    # Any specification of a post ID we skip since it's post specific
    RewriteCond %{QUERY_STRING} !.*p=.* [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator|Recent) [NC]
    RewriteRule .* http://feeds.feedburner.com/feedname? [L,R=307]
    
    # Comment feeds can be called via /comments, wp-commentsrss2, or withcomments=1 to the main feed script
    RewriteCond %{REQUEST_URI} ^/(comments/|wp-commentsrss2).* [NC,OR]
    RewriteCond %{QUERY_STRING} ^.*withcomments=.*$ [NC]
    
    # Calls directly to the feed scripts that include 'withcomments' limit to POSTS with comments
    RewriteCond %{REQUEST_URI} !^/(wp-atom|wp-feed|wp-rss|wp-rdf).* [NC]
    
    # Any specification of a post ID we skip since it's post specific
    RewriteCond %{QUERY_STRING} !.*p=.* [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator|Recent) [NC]
    RewriteRule .* http://feeds.feedburner.com/commentfeedname? [L,R=307]
    
    </IfModule>

Reply

You must log in to post.

About this Topic