January 23

.htaccess redirect help of ‘?feed=rss2’

I recently moved my blog from the base of www.santarmj.staging.wpengine.com to www.santarmj.staging.wpengine.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://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://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://securitycatalyst.com/?feed=rss2 to http://securitycatalyst.com/blog/feed/

I’m finding no joy.

The current .htaccess includes:

Redirect permanent /feed/ http://securitycatalyst.com/blog/feed/
#redirect the ?feed=rss2 people, namely iTunes
RewriteEngine On
RewriteCond %{QUERY_STRING} ^rss=1$
RewriteRule ^(.*)$ http://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?


Tags


You may also like

Are you using frameworks properly?

Leadership and communication are actually layers, not levels

  1. RedirectMatch 301 ^/?feed=rss2 http://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…

  2. RedirectMatch 301 ^/?feed=rss2 http://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…

Comments are closed.
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Subscribe to our newsletter now!