0

I need to redirect the requests for my old website (www.old.com) to the new domain (www.new.com) but I would like to keep the old content available in a different folder (www.old.com/oldsite).
I've got the rule to redirect all requests but the folder exception doesn't seem to be working:

RewriteCond  %{HTTP_HOST} www.old.com
RewriteRule ^/old_website/(.*) $1
RewriteRule (.*) http://www.new.com/new_site_is_here.php

Thanks!

asg2012
  • 101
  • 1

1 Answers1

1

Add another RewriteCond that requires it to not be /oldsite.

RewriteCond %{REQUEST_URI} !^/oldsite.*
  • Maybe I'm not doing this the right way but it doesn't seem to work: – asg2012 Mar 01 '14 at 09:57
  • `RewriteCond %{HTTP_HOST} !www.old.com/www_old_com.* RewriteRule (.*) http://www.new.com/new_site_is_here.php RewriteCond %{HTTP_HOST} www.old.com RewriteRule ^/www_old_com/(.*) $1` – asg2012 Mar 01 '14 at 09:57