Actions

Difference between revisions of "Adding www to a url"

From Joomla! Documentation

m (How do I get www as a prefix in all my joomla sites?)
m (How do I get www as a prefix in all my joomla sites?)
Line 3: Line 3:
  
 
Add the following to your htaccess file
 
Add the following to your htaccess file
{{{
+
<source lang="text">
 
RewriteEngine On
 
RewriteEngine On
RewriteCond %{HTTP_HOST} ^whisperingtree\.net$ [NC]
+
RewriteCond %{HTTP_HOST} ^domain\.net$ [NC]
RewriteRule ^(.*)$ http://www.whisperingtree.net/$1 [R=301,L]
+
RewriteRule ^(.*)$ http://www.domain.net/$1 [R=301,L]
}}}
+
</source>

Revision as of 15:59, 24 September 2009

How do I get www as a prefix in all my joomla sites?

Add the following to your htaccess file

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.net$ [NC]
RewriteRule ^(.*)$ http://www.domain.net/$1 [R=301,L]