Forum Moderators: phranque
Somehow, even though I had the noindex, nofollow meta tag in my staging directory for a site that I was creating, it still got indexed by MSN (maybe others). I'd like to do a 301 redirect in my .htaccess file redirecting any requests for any files or subdirectories in this folder to the site's own domain. This is what I've tried, but it didn't work:
Redirect 301 /staging/ http://www.sitesowndomain.com
Can someone help me get this right?
Thanks!
ginger
[edited by: jdMorgan at 2:16 pm (utc) on July 22, 2007]
[edit reason] De-linked [/edit]
That doesn't tell us much... *How* did it not work?
How did you test?
What were the results?
How did those results differ from your expectations/requirements?
Without knowing that, all I can do is guess that you got an error message or that you want all pages redirected to the root of the new domain, dropping the paths to the individual pages themselves. In that case, I'd suggest:
RedirectMatch 301 ^/staging/(.*)$ http://www.sitesowndomain.com/