How to creat 301 Redirect for subpages..?

I am getting lots of errors in google webmaster tools because of duplicate URL/content. So i am trying to do 301 redirect to one domain. I use joomla platform if i redirect from [noparse]justdownload.in[/noparse] to [noparse]www.justdownload.in[/noparse] backend also getting redirected to [noparse]www.justdownload.in/index.php[/noparse] how to avoid this?

So i have redirected from [noparse]www.justdownload.in[/noparse] to justdownload.in. but the problem is google has indexed more pages with [noparse]www.justdownload.in[/noparse] and also i got more backlinks for [noparse]www.justdownload.in[/noparse] and so if some one search for something on google and come to my site they are all landing to homepage not subpage. please help i am loosing lots of visitors.

I searched google and got this code do i need to alter anything so that my visitors land to sub pages.
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} [1]www.justdownload.in[/noparse] [nc]
rewriterule ^(.*)$ http://justdownload.in/$1 [r=301,nc]
########## Begin - Custom redirects


  1. noparse ↩︎

me-all,

Yes, that’ll do it (although I’d escape the dot characters in the RewriteCond AND I’d change the RewriteRule to:

RewriteRule .? http://justdownload.in%{REQUEST_URI} [R=301,L]

because the entire atom that (.*) captures is already available as {REQUEST_URI}.

I must note, though, that your intro text was trying to redirect from just.in to www.just.in while the code you showed did the reverse.

Regards,

DK

Thank you very much david it worked…!