• Hi everyone,

    So quick overview:

    • I’m working on a site that is currently running on a platform other than WordPress.
    • They have a mobile app that pulls in content via RSS feeds from their site.
    • We’re developing a new site that is based on WordPress.
    • The problem: WordPress’s RSS feed links are different than the old platform (specifically the category feed links), and I can’t answer as to why we can’t update the apps…

    So, for example, the current RSS feed URL pulling in “news” is formatted as:
    https://site.org/rss/news

    WordPress formats it as:
    https://site.org/category/news/feed

    Very simply, I just want any HTTP requests made to “https://site.org/rss/news” to be redirected to “https://site.org/category/news/feed”.

    I assume I need some sort of mod rewrite rule, but I’m not very knowledgable in this area. This is some code I’m currently messing with:

    RewriteEngine on
    RewriteRule "^/rss/news$" "/category/news/feed"

    But that doesn’t work.

    I’m wondering if someone here might have an idea of how we can accomplish this?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • As long as you only need it for one to a couple of categories, I think this will accomplish what you want.

    In FTP or File Manager go the the home folder of your website.

    Then create a folder called ‘rss’ and inside that create a folder called ‘news’. Then inside the folder ‘news’ (which should be at the url https://site.org/rss/news) create an ‘index.php’ file. Then insert the code below

    <?php
    /* Redirect browser */
    header("Location: https://site.org/category/news/feed");
    
    exit;
    ?>

    This code will redirect any requests at “https://site.org/rss/news&#8221; to “https://site.org/category/news/feed&#8221;.

    Let me know if that works for you.

    PS: In the folder ‘rss’ so you don’t have a blank folder (which is bad BTW) create an index.php file and put nothing in it. Or for fun, add this code:

    // Silence is Golden

    Thread Starter Keith Brinks

    (@stargater59)

    Hi Jake,

    Thanks for the response – that’s an interesting solution and would probably work. However, we were able to get a proper mod rewrite rule to work:

    RewriteCond %{REQUEST_URI} ^/rss/new(.*)$
    RewriteRule . /category/news/feed/ [R=301,L]
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redirecting category RSS feed URLs’ is closed to new replies.