.htaccess redirect help of ‘?feed=rss2′
I recently moved my blog from the base of www.securitycatalyst.com to www.securitycatalyst.com/blog (and then filled in the balance of the site). I considered the need to redirect the feed, and established a .htaccess file in the root with one line:
‘redirect permanent /feed/ http://www.securitycatalyst.com/blog/feed/’
It works and feedburner works (for most it’s only 1, maybe 2 redirects). Turns out, however, that iTunes is looking for http://www.securitycatalyst.com/?feed=rss2
I have spent a few days and 2 hours this evening pouring through the forums and trying every combination of code I can find to be able to redirect http://www.securitycatalyst.com/?feed=rss2 to http://www.securitycatalyst.com/blog/feed/
I’m finding no joy.
The current .htaccess includes:
Redirect permanent /feed/ http://www.securitycatalyst.com/blog/feed/
#redirect the ?feed=rss2 people, namely iTunes
RewriteEngine On
RewriteCond %{QUERY_STRING} ^rss=1$
RewriteRule ^(.*)$ http://www.securitycatalyst.com/blog/feed/ [R=301,L]
I would love some insights or guidance. Clearly, I’m doing something wrong and hopefully missing something that is obvious to those of you who understand code better than me.
Suggestions, insights?
If you enjoyed this post, make sure you subscribe to my RSS feed!
Posted in Information Protection |
Print this post
|
Permalink
















Marq said,
April 30, 2008 @ 3:41 pm
RedirectMatch 301 ^/?feed=rss2 http://www.securitycatalyst.com/blog/feed/
Hmmm.. without being able to test this live on your box to see how it reacts, this ’should’ do the trick.. or it will be some slight variation thereof with a shibang possibly.
Its basically saying to throw any request with the ?feed=rss2 over to that full URL where it is located now.
I am sure you will let us know how it works out…