Im having trouble setting up redirection on my main site so that all traffic to one of the subdirectory gets sent to a file on a different domain.
specifically, I want to redirect anything in the dir:
www.computingasyoulikeit.com/familytree
to
http://www.dingfelder.org/modules.php?name=familytree
I need to make this a dynamic redirection (instead of manually listing each url to redirect seperately), because there are several hundred files in the old dir that may be linked from google or other websites. Any traffic to the directory itself or any files contained in it should get redirected.
I set up a .htaccess file from some instructions I saw on the web and tried:
Redirect /familytree http://www.dingfelder.org
I alos tried with a slash
Redirect /familytree/ http://www.dingfelder.org/
Lastly, I also tried with a 301 code
Redirect 301 /familytree/ http://www.dingfelder.org/
In all cases, it redirects the familytree folder itself but ignores requests to files within it.
I then tried using rewrite to include the files
RewriteEngine On
RewriteRule /familytree/(.*) http://www.dingfelder.org/modules.php?name=familytree
or in the familytree dir I tried:
RewriteEngine On
RewriteRule ^familytree/(.*) http://www.dingfelder.org/modules.php?name=familytree
Other variations that I tried from other people's examples (that also didnt work) included:
RewriteRule ^/familytree/.*(.*) http://www.dingfelder.org [R=301,L]
RewriteRule /familytree/.*(.*) http://www.dingfelder.org/modules.php?name=familytree
What seems to happen is that if I use a url like:
www.computingasyoulikeit.com/familytree/100.html
it gets translated into
http://www.dingfelder.org/modules.php?name...ilytree100.html
(the $1 param is getting added when I want to discard it)
Can anyone provide insight into where I am going astray ?