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

1.4k Views Asked by At

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.)

1

There are 1 best solutions below

5
On BEST ANSWER

Add something like this to your .htaccess file

Redirect 303 /rss.xml /rss-xml