.htaccess - Redirect urls of a blog - htaccess -


my questions simple, how can redirect kind of urls :

www.domain.com/?page_id=25&id=46 : www.anotherdomain.com/

when try :

rewritecond %{http_host} ^domain\.com$ [or] rewritecond %{http_host} ^www\.domain\.com$ rewriterule ^/?$ "http\:anotherdomain.com\" [r=301,l] 

the url redirected http:anotherdomain.com\?page_id=25&id=46

and redirection need redirect :

blog1.domain.com anotherdomain.com knowing there multiple blocks.

thanks help, best regards.

rewriteengine on rewritecond %{http_host} ^(www|blog1)\.domain\.com$ [nc] rewriterule ^ http://www.anotherdomain.com/? [r=301,l] 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -