Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
server-administration:redirect-non-www-to-www [2009-10-14 23:51:19]
garrett.plasky
server-administration:redirect-non-www-to-www [2010-06-22 23:06:52]
garrett.plasky
Line 1: Line 1:
-====== Redirect non-www Traffic to www Using mod_rewrite ====== +Moved to [[:apache:redirect-non-www-to-www|the Apache category]].
- +
-Create a .htaccess file in your webroot (public_html for cPanel servers) and add the following lines: +
- +
-<q>%%RewriteEngine On +
-RewriteCond %{HTTP_HOST} ^your-domain.com +
-RewriteRule (.*) http://www.your-domain.com/$1 [R=301,L]%%</q> +
- +
-{{tag>apache how-to}}+