Google Answers Logo
View Question
 
Q: .htaccess joomla rss feed to new wordpress rss feed redirect or rewrite needed.. ( No Answer,   3 Comments )
Question  
Subject: .htaccess joomla rss feed to new wordpress rss feed redirect or rewrite needed..
Category: Computers > Programming
Asked by: zachmg-ga
List Price: $10.00
Posted: 18 May 2006 21:37 PDT
Expires: 17 Jun 2006 21:37 PDT
Question ID: 730280
I've recently transitioned my site from Joomla to Wordpress.
Everything is working great, accept for the old RSS requests coming in
from the Joomla URI.

I'm seeing a lot of hits to the non-functional url:
http://www.mysite.com/?option=com_rss&feed=RSS2.0&no_html=1

That I would like redirected to the functional:

http://www.mysite.com/feed/

or (without Wordpress' built-in redirection):

http://www.somesite.com/?feed=rss2

For the more basic url's I've used simple redirects, as in:

<IfModule mod_rewrite.c>
RewriteEngine On
Redirect 301 /cache/rss20.xml http://www.somesite.com/feed/
</IfModule>

Which works perfectly. I've tried escaping the '.', '?' and even the
'&' and '=' thinking maybe it was a simple regex issue.

I'd really like to get this issue fixed, I still get a lot of hits to
that older url and its pointing (via Wordpress) to nothing but a blank
page.
Answer  
There is no answer at this time.

Comments  
Subject: Re: .htaccess joomla rss feed to new wordpress rss feed redirect or rewrite needed..
From: kevint-ga on 29 May 2006 06:57 PDT
 
You're almost there actually.

The question mark after 'mysite.com/' will actually be refering to a
default page such as 'index.php' so you will need to redirect that
page using the redirect rules you've been using above.

Depending how far you need to go with your rewrites (whether you need
to do anything with bits after the ?) the apache documentation is very
helpful at apache.org.

Hope this helps,

Kevin
Subject: Re: .htaccess joomla rss feed to new wordpress rss feed redirect or rewrite needed..
From: abuzant-ga on 31 May 2006 18:10 PDT
 
Hello

Try these lines,

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule  ^/?option=com_rss(.*) /feed/ [L,PT]
  RewriteRule  ^/index.php?option=com_rss(.*) /feed/ [L,PT]
</IfModule>

Shall work like a charm, 
good luck, Ruslan
Subject: Re: .htaccess joomla rss feed to new wordpress rss feed redirect or rewrite need
From: zachmg-ga on 31 May 2006 21:32 PDT
 
abuzant-ga,
The rule looked so promising. I know htaccess/mod_rewrite is working
because aside from my slew of 301's are working and Word Press's own
rewrite rules are working (and the odd image block from badly behaved
netitizens). I put the rule at the very top of my htaccess file to be
sure that WP's own rewrite rules didn't pre-empt it (assuming it
would).

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule  ^/?option=com_rss(.*) /feed/ [L,PT]
  RewriteRule  ^/index.php?option=com_rss(.*) /feed/ [L,PT]
</IfModule>

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Then of course my series of redirects such as:

<IfModule mod_rewrite.c>
RewriteEngine On
Redirect 301 /cache/rss20.xml http://www.mysite.com/feed/
</IfModule>

I'd really like this to work because I'm still getting about 150 hits
a day, while that might not seem like much its the world if your
trying to grow your site. :)

To be thorough I renamed my existing .htaccess file temporarily and
replaced it with an .htaccess file *only* containing the rules you'd
provided. Still no luck.

I definitely appreciate the help though.


Zach

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy