Web Hosting Talk







View Full Version : mod rewrite domain1/sub to domain2/sub


TheRealDeal
12-19-2003, 02:27 AM
Hi,

After doing research I was told that I can do the following:

ONLY Directory PLUS all directory within DIR1

http://domain1.com/dir1 --> http://domain2.com/dir2

e.g. http://domain1.com/dir1/dir11 --> http://domain2.com/dir2/dir22

..etc

I want the mod rewrite to effect only THAT dir and the rest runs normal. Is this possible?? Thanks in advance.

Oopsz
12-19-2003, 01:56 PM
make a .htaccess file in domain1.com/dir1, and put these directives in it:

RewriteEngine on
RewriteRule ^(.*) http://domain2.com/dir2/$1 [R]