I want to redirect some of my domains to a main one. For some of them I will do 301 to the entire domain. But some other have inner pages with PR and backlinks. How can I make redirects for those pages to appropriate pages on the main domain and also redirect everything else to the homepage ? Thanks.
to avoid a headache go to rentacoder.com and pay about $100 - $200 to get it done 301 redirects are not something to play with if you do not know what you are doing but you will lose any page rank - eventually the page rank should be passed onto the the new url
If your pages are built with PHP: <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new-url.com" ); ?> PHP: Or ASP: <% Response.Status="301 Moved Permanently"; Response.AddHeader("Location","http://www.new-url.com/"); %> Code (markup):
The solution suggested by Fold is doing the job on client site. IMO is better doing the job on server side. You need to update your .htaccess file: at OLD_domain.com/.htaccess Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^whatever/(.*)$ http://www.NEW_domain.com/$1/ [R=301,L] The last line maybe need to be changed depending on your site structure. (.*) and $1 work the same way here as in mod_rewrite, so you can easily change a lot of URLs with one line. The only change with redirects and mod_rewrite is the R=301 (Redirect 301). You can find more info on these pages: Apache mod_rewrite, 301 FAQ redirect thread on DP