How do you redirect this:
world wide web.sub.example.com
world wide web.example2.com
How's this done -- 301? .htaccess? Can someone point me within the right direction please? My host is NearlyFreeSpeech and also the domain I wish to redirect to is very a sizable site having a static IP.
You will find multiple ways to get this done:
- For those who have charge of the domain, use a CNAME record supplied by your DNS server.
- In Apache, you are able to specify a
RedirectPermanentdirective inside your Apache configuration files (httpd.conf, .htaccess, etc.)
- In Apache, you are able to specify a reverse proxy through the
ProxyPassdirective. Here's some documentation detailing this solution.
Other solutions are possible, and usually vary by server and configuration stack. I suppose Apache compliance, given the existence of .htaccess within the problem statement.
Here is a Wikipedia reference on redirects through the 3xx group of HTTP status codes, if anyone's interested in the client's perspective.
Something similar to this will get it done
RedirectPermanent / http://world wide web.example2.com
RedirectPermanent would return a 301 code and pressure the customer to visit world wide web.example2.com, it really works in apache config file and
.htaccess file. You'll need
mod_alias enabled to make use of it.
This can be used around the root directory from the subdomain inside a
.htaccess file, or perhaps in the virtualhost portion of your apache configuration file.
For the reference the documentation