Search code examples
.htaccesshttp-redirectjoomlajoomla-sef-urls

How to do a custom redirect to a new url using .htaccess


I have generated an rss feed in my custom component in my joomla site.

I am using ARTIO SEF in my joomla site for configuring SEF urls, and i changed the SEF url for the rss feed to something like this: http://www.mysite.com/rss.xml

But i am getting a 404 page when i visit that url.

However this url is working: http://www.mysite.com/rss-xml

I am confused at what changes i need to make to my site (or .htaccess file) to make a custom redirect to the rss-xml page when a user visits rss.xml page.

(Note: I am using localhost initially for development.)


Solution

  • Add something like this to your .htaccess file

    Redirect 303 /rss.xml /rss-xml