Is it possible to create a rule for mod_rewrite
which forwards queries to another site while saving original path in address-string?
-
1You'll get more and better answers if you ask on serverfault.com or webmasters.stackexchange.com– Doug HarrisCommented 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.– WuffersCommented Jul 7, 2011 at 6:16
Add a comment
|
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]
-
1That task solved simple over iptables. nat+masquerade - good solition Commented Mar 16, 2011 at 9:45