mod_rewrite problem

Since I have worked out the separated rss feeds for my page, I have to battle with mod_rewrite again, which I definitively dislike as I always tend to wreck my sites that way.

My current .htaccess file works quite the way I’d need it, but I’d need to extend it for the new feeds. Well – here it is so far:

ErrorDocument 404 /index.php?error=404


RewriteEngine On
RewriteBase /

##### feedburner
### redirect for feedburner feed
RewriteCond %{HTTP_USER_AGENT} ^FeedBurner.*$
RewriteRule ^feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1 [QSA,L]
RewriteCond %{HTTP_USER_AGENT} ^FeedBurner.*$
RewriteRule ^(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1 [QSA,L]

# redirect for users not subscribed
RewriteCond %{HTTP_USER_AGENT} !^FeedBurner.*$
RewriteRule ^(feed|rdf|rss|rss2|atom)/?$ http://feeds.feedburner.com/StarBlog [R,L]
RewriteCond %{HTTP_USER_AGENT} !FeedBurner.*$
RewriteRule ^feed/(feed|rdf|rss|rss2|atom)/?$ http://feeds.feedburner.com/StarBlog [R,L]
##### /feedburner

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

My problem now is adding rules for http://my.stargazer.at/feed/lang/de/ and http://my.stargazer.at/feed/lang/en/ for redirecting those visitors to my Feedburner feeds. Any ideas?

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *