I need som SEO help here, I am using joomla with custom coded added.

But when we trun on our SEO feature everything is good, but our links are not going to the correct path.

Code:
Here is an example of NON-SEO link
http://site.com/index.php?option=com_community&view=profile&userid=userid&Itemid=100


When we turn on SEO

The link is
http://site.com/community/65-sexyapp/photos


But we need it to REad
http://site.com/components/community/userid-username/photos
We've tried

Redirect /community/$1/photos /component/community/$1/photos
DOES NOT WORK


WE've also Tried
RewriteRule ^component/([a-zA-Z0-9_-]+)/$1-$2/([0-9]+)\ http://site.com/index.php?option=com_community&view=profile&userid=$1&Itemid=$ [NC]

Still nothing works, it just remains to the default, SEO change that is not correct, please HELP