Empulse Group a collection of notes from a sys admin, musician, and father


Apache Redirect or Rewrite

You can quickly create a .htaccess file to have a domain forward to a different one.

Redirect 301 / http://www.theotherdomain.com


RewriteEngine on
rewritecond %{http_host} ^mystuff.com [nc]
rewriterule ^(.*)$ http://www.theotherdomain.com/$1 [r=301,nc]

You can then use curl to see if the headers were updated.

[root@www ~]# curl -I www.mystuff.com
HTTP/1.1 301 Moved Permanently
Date: Mon, 08 Nov 2010 23:07:56 GMT
Server: Apache/2.2.3 (Red Hat)
Location: http://www.theotherdomain.com
Cache-Control: max-age=31536000
Expires: Tue, 08 Nov 2011 23:07:56 GMT
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1
Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.

Copyright © 2018 Empulse Group · Powered by WordPress
Lightword Theme by Andrei Luca Go to top ↑