let me tell you first what exactly i want to do, I have olddomain.com and a newdomain.com I have more then 1000+ pages on both websites Now, I want: HomePage + Few Other Pages of olddomain.com to stay at olddomain.com (ie... olddomain.com, olddomain.com/1.htm, olddomain.com/2.htm, olddomain.com/3.htm) and rest of the pages to be 301 to newdomain.com!! I think, I was quite clear ... I knw how to 301 all links ... but duno how to 301 all links without effecting few links!! please suggest
With regular expressions in your htaccess file. Use with care though - I did this exact thing recently, the (rather high) traffic that was going to the old domain basically crashed to zero as Google took the old site right out of the SERPs within about 3 days of adding the redirect. I don't think I'm even going to make adsense payout threshold this month, its the 22nd and I've only got $108
RumpledElf is right, RegEx in htaccess file can do it. But, since you want to keep some of your pages in old domain, you need to add some exception rules.