0

Is it possible to create a rule for mod_rewrite which forwards queries to another site while saving original path in address-string?

2
  • 1
    You'll get more and better answers if you ask on serverfault.com or webmasters.stackexchange.com Jan 21, 2011 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, 2011 at 6:16

1 Answer 1

0

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]
1
  • 1
    That task solved simple over iptables. nat+masquerade - good solition
    – user64081
    Mar 16, 2011 at 9:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .