Redirect All Traffic to WWW(modrewrite)

REDIRECT TRAFFIC TO WWW

Add the following to your apache .htaccess

<ifmodule mod_rewrite.c>
  RewriteEngine on

  RewriteCond %{HTTP_HOST} ^mydomain.com
  RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

</ifmodule>

 

Cookbook Category: 

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.