Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

There are many tutorials out there, but all of them give you the same code snippet. I put it into my htaccess file, but the feeds are not being redirected.

I don't want to use a plugin.

I'm sure the code works. I need to figure out why it doesn't work for me. Here's part of my code:

# 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]


# temp redirect wordpress content feeds to feedburner
 RewriteEngine on
 RewriteCond %{HTTP_USER_AGENT} !FeedBurner    [NC]
 RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]
 RewriteRule ^feed/?([_0-9a-z-]+)?/?$ http://feeds.feedburner.com/ZoomingJapan [R=302,NC,L]
</IfModule>

#Prevent directory indexing
Options -Indexes

# END WordPress
share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

The rules for Feedburner should come before the WordPress rules. And activate the rewrite engine just once. That’s enough. :)

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_USER_AGENT} !FeedBurner    [NC]
RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]
RewriteRule ^feed/?([_0-9a-z-]+)?/?$ http://feeds.feedburner.com/ZoomingJapan [R=302,NC,L]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

</IfModule>
share|improve this answer
    
Now it's working. Thank you so much for helping me out twice! So effectfully, too! :) –  japanworm Nov 20 '11 at 14:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.