How do I redirect this:
www.sub.example.com
to this:
www.example2.com
How is this done -- 301? .htaccess? Can someone point me in the right direction please? My host is NearlyFreeSpeech and the domain I want to redirect to is quite a large site with a static IP.
There are multiple ways to do this:
Redirect
or RedirectPermanent
directive in your Apache configuration files (httpd.conf, .htaccess, etc.)ProxyPass
directive. Here's some documentation detailing this solution.Other solutions are possible, and generally vary by server and configuration stack. I assume Apache compliance, given the presence of .htaccess in the problem statement.
Here's a Wikipedia reference on redirects via the 3xx family of HTTP status codes, if anyone's curious about the client's perspective.