301 redirects with Joomla htaccess

From time to time you may need to make your own custom 301 redirects in Joomla.
Recently I had to redirect some .asp files of an old web site to a new Joomla site. The best way to do this is through .htaccess.

.htaccess 301 redirects for Joomla

Usually, a 301 redirect is quite a simple matter - the code below should do the trick:

Redirect 301 /oldpage.html

However, Joomla's use of .htaccess blocks this method. After a lot of searching I found out how to do a 301 redirect using Joomla's .htaccess.

To redirect to - do the following:

RewriteRule ^subfolder\/oldpage\.asp$ "" [R=301,L]

To simply redirect one page:

RewriteRule ^index\.asp$ "" [R=301,L]

 Redirecting a folder:

RewriteRule ^languages\?$ "" [R=301,L]
Thanks to g1smd from Freeuk for additional info.

Recommended Client Management Program