Forum Moderators: bakedjake
I would like to alter our .htaccess so that when someone goes to any page on our website they are redirected to an identical directory but on another domain.
For example,
if someone goes to www.abc.com/pages/etc/fred.php
they are redirected to www.xyz.com/pages/etc/fred.php
There are multiple directories and sub directories.
It should also work whether or not visitors use "www".
From the forums I gleaned the following, however it does not seem to work...
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.xyz\.com
RewriteCond %{HTTP_HOST}!^111\.222\.333\.444
RewriteRule ^(.*)$ http://www.xyz.com/$1 [R=permanent,L]
I know rewrite works on our servers
Thank you in advance :-)
Redirect 301 /fred [webmasterworld.com...]
Will redirect all traffice from the fred directory to www.webmasterworld.com/fred/