I have basic domain, for example, domain1.com. Also I have domain2.com which is addon domain, and I want to redirect domain2.com to domain.com?parameter=value, which is basically domain1.com, but with another template, but that path in URL stays same, domain2.com, not domain1.com. .htaccess file is created inside addon domain directory (public_html/domain2.com), and I have these two lines:
RewriteCond % ^domain2.com
RewriteRule ^(.*) http://domain1.com?parameter=value [P]
Rewrite works, but URL in browser changes to domain1.com.
EDIT: U have this code to .htaccess, but URL change to domain1.com, instead to stay on domain2.com.
RewriteCond %{HTTP_HOST} ^domain2\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain2\.com$
RewriteRule ^/?$ "http\:\/\/domain1\.com\/\?parameter\=value" [R=301,L]
RewriteCond
line is not as you have posted as otherwise it wouldn't redirect anything?