EZ Linux Admin random header image

301 redirect

October 12th, 2009 by EZ linux · No Comments

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

This will redirect dwhs.com to www.dwhs.com (change dwhs.com to your domain name)

Step by step for DWHS Customers:

  1. log into your cpanel: www.your-main-domain.com/cpanel/
  2. Click file manager and click the option to see hidden files
  3. Make sure your in the folder public_html or www
  4. Then create a new file called:  .htaccess
  5. Then in edit that file by adding this code:

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

Tags: Cheat Sheets · Linux Tricks

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment