Hi,
I'm trying to redirect an old site to their new domain. I'm not worried about seo as the content has changed a lot, so I'd like to have all the pages just redirect to the homepage. There is also an exception to the redirect that the /documents directory shouldn't be redirected.
Anyway, I found started with the following (from this forum):
RewriteEngine on
RewriteCond $1 !^documents
RewriteRule (.*) [
newdomain.com$1...] [R=301,L]
It works great, but it looks like it's redirecting subpages to the same subpage on the new server instead of the homepage. I know it's something obvious but I don't see it.
Two questions:
1. What is the $1 doing in the RewriteCond and the RewriteRule?
2. Should the (.*) be replaced by ^?
Thanks everyone!