I have an RSS feed example.com/?format=feed&type=rss
from an old Joomla install. The site is now built with Jekyll, and uses a new URL example.com/rss.xml
for the RSS feed.
Rewrite rules aren't working for me since the URL starts with "?". I've got it working with an if directive but want to avoid using if.
Here's the working if directive which I want to replace with a rewrite or redirect:
if ($args ~ "type=rss") {
rewrite ^ https://example.com/rss.xml? permanent;
}
Can the if directive for the URL starting with "?" be replaced with a rewrite or redirect?