Is it possible to create Rule for mod_rewrite to forward queries to another site with saving original path in address-string?

link|improve this question
1  
You'll get more and better answers if you ask on serverfault.com or webmasters.stackexchange.com – Doug Harris Jan 21 '11 at 16:20
@DougHarris: Please do not encourage cross-posting. If it is off topic it will be migrated to another site. – Wuffers Jul 7 '11 at 6:16
feedback

1 Answer

I'm not mod_rewrite expert, but have you tried something like:

RewriteCond %{HTTP_HOST} ^olddomain\.com [NC]
RewriteRule ^(.*) http://www.newdomain.com/$1 [R=301,L]
link|improve this answer
That task solved simple over iptables. nat+masquerade - good solition – user64081 Mar 16 '11 at 9:45
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.