301 permanent redirects: non-SEF to SEF

OK, so you have a site; perhaps an old site that didnt have SEF enabled but the pages have good Page Ranks. Now you'd like to implement SEF URL's but retain the Page Ranks which you have worked hard to get.

By implementing 301 permanent redirects from the '.htaccess' file you can tell search engines that a page URL has changed permanenly and in doing so the new URL will be listed in the search engines AND the page rank from the old URL will be passed across.

As the old style URL's had a 'query string' structure to them, implementing a 301 permanent redirect is a little trickier than URL's without 'query strings'.

I recently used something like the following to get around this:

301 permanent redirect for a URL with query strings
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=13&Itemid=47$
RewriteRule ^index.php$ http://www.mydomain.com/resources/learning-library? [L,R=301]

This redirects the old style query string type URL from

http://www.mydomain.com/index.php?option=com_content&view=article&id=13&Itemid=47

to

http://www.mydomain.com/resources/learning-library

Redirecting SEF URL's

Redirecting SEF style URL's is a much simpler task, see below:

Redirecting SEF URL's are much simpler
Redirect 301 /myoldpage.html http://www.mydomain.com/training-resources.html

The example above redirects

http://www.mydomain.com/myoldpage.html

to

http://www.mydomain.com/training-resources.html

As the URL being redirected doesn contain any 'query strings', the above much simpler method is appropiate.