Adding WWW to Joomla URL

General questions relating to Joomla! 1.5 There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
erbag
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Fri Nov 18, 2005 8:31 pm
Location: Jamaica
Contact:

Adding WWW to Joomla URL

Post by erbag » Mon Sep 21, 2009 10:23 pm

The web hosting service I use displays all my website as http://mysite.com. I normally add www to my urls using the .htaccess file. The code looks like this:

Code: Select all

## Add WWW to url
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
No when I add

Code: Select all

RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
[/code]
to Joomla's .htaccess file this doesn't work.

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

User avatar
pxforti
Joomla! Hero
Joomla! Hero
Posts: 2755
Joined: Wed Apr 04, 2007 8:54 pm
Location: Driggs, Idaho

Re: Adding WWW to Joomla URL

Post by pxforti » Tue Sep 22, 2009 1:52 pm

RewriteEngine On
RewriteCond %{HTTP_HOST} ^whisperingtree\.net$ [NC]
RewriteRule ^(.*)$ http://www.whisperingtree.net/$1 [R=301,L]
Joomla Website Design / CS-Cart Website Design
http://writenowdesign.com

erbag
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Fri Nov 18, 2005 8:31 pm
Location: Jamaica
Contact:

Re: Adding WWW to Joomla URL

Post by erbag » Tue Sep 22, 2009 3:29 pm

Thanks! Testing it now....

erbag
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Fri Nov 18, 2005 8:31 pm
Location: Jamaica
Contact:

Re: Adding WWW to Joomla URL

Post by erbag » Tue Sep 22, 2009 3:35 pm

Works like a charm.....YAHHHHHHHH!!!!!

User avatar
pxforti
Joomla! Hero
Joomla! Hero
Posts: 2755
Joined: Wed Apr 04, 2007 8:54 pm
Location: Driggs, Idaho

Re: Adding WWW to Joomla URL

Post by pxforti » Tue Sep 22, 2009 4:00 pm

Glad to hear it works.
Joomla Website Design / CS-Cart Website Design
http://writenowdesign.com

User avatar
Sukanya
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed May 16, 2007 1:47 pm

Re: Adding WWW to Joomla URL

Post by Sukanya » Mon Feb 15, 2010 4:55 am

I had a similar issue, but this doesn't work for me. Here's the code that I added to .htaccess file.

RewriteEngine On

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

Please note that I use SH404SEF component for SEF URLs

User avatar
khakbarsarat
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Thu Oct 22, 2009 5:09 am
Location: pakistan
Contact:

Re: Adding WWW to Joomla URL

Post by khakbarsarat » Tue Aug 17, 2010 1:09 pm

my Joomla site sometime downt work with"www" while it is working well witout " www"
any help
we can do

himanshu_cool
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Thu Jun 20, 2013 12:55 pm

Re: Adding WWW to Joomla URL

Post by himanshu_cool » Tue May 27, 2014 7:00 am

Hello Sir,
I want to add www before my site name but problem is that in my site url there is country code also. Like (for french) : http://fr.sitename.com , (for Swedish) http://sv.sitename.com .

If i use force redirect rule on Htaccess then all link will redirect to http://www.sitename.com and when i can the language from downdonn then site again redirect to main site http://www.sitename.com. So how i manage this thing.

Please help me.

Thanks


Locked

Return to “General Questions/New to Joomla! 1.5”