Skip to content

Creative Notice

An ensemble of ideas about development, project management & techniques.

  • Home
  • About
  • Tips & Tricks
  • Topics
    • Coldfusion
    • SQL
    • JavaScript

rewrite

Generic .htaccess non-www Redirect to www

February 4, 2013 by Ryan Mueller

Here you go. I found this handy.

RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Posted in Tips & TricksTagged 301, htaccess, linux, redirect, rewriteLeave a comment

Archives

Recent Posts

  • CUPS Server Resource Management
  • Cleaning up Magento 1.9 Disk Session Storage
  • Two Ways to Clean Email from ERP Database
  • Cleaning SQL Columns for Export
  • Manual Install / Upgrade OpenSSH on Ubuntu
Qwerty Theme by Seven Bold