NYCPHP Meetup

NYPHP.org

[joomla] Using www in URL

Donna Marie Vincent donnamarievincent at yahoo.com
Tue Aug 19 11:04:50 EDT 2008


I noticed on one of my sites (J1.5) that's running the new VirtueMart, if you go to http://mydomain, it uses a different browse template that if you go to http://www.mydomain!

I tried setting the life site in the Joomla config file, but that doesn't stop someone from typing in the url w/o the www.




----- Original Message ----
From: Mitch Pirtle <mitch.pirtle at gmail.com>
To: NYPHP SIG: Joomla <joomla at lists.nyphp.org>
Sent: Tuesday, August 19, 2008 9:23:15 AM
Subject: Re: [joomla] Using www in URL

Hey Dan,

I put this in my apache config file:

# spacemonkeylabs.com --- redirect to www
<VirtualHost *>
    ServerName spacemonkeylabs.com
    Redirect / http://www.spacemonkeylabs.com/
</VirtualHost>

I use debian with no cpanel, and stock debian creates separate config
files for each domain (in /etc/apache2/sites-available). It is a great
practice, one I wish I saw more in the wild ;-) But I digress.

For your config file you add something similar to what I did above,
and that should tell apache to redirect all requests without the www
subdomain to the www subdomain. That is my personal preference, but
you can go either way.

-- Mitch

On Mon, Aug 18, 2008 at 6:20 PM, Dan <dan at muchospanish.com> wrote:
> Thanks, Mitch, but how do I change it to use "www" which I prefer? Also, how
> do I have Apache re-direct? Is it in the .htaccess file? By mistake I posted
> my problem this morning in the 1.5 forum and someone said to do this:
>
> # Rule for duplicate content removal : domain.com vs wwwdomain.com
>
> RewriteCond %{HTTP_HOST} ^www.muchospanish\.com [NC]
> RewriteRule (.*) http://muchospanish.com/$1 [R=301,L,NC]
>
> Unfortunately, it doesn't work in the 1.0.x version.
>
> Thanks again.
>
> Dan
>
> On Aug 18, 2008, at 5:37 PM, Mitch Pirtle wrote:
>
>> Hey Dan,
>>
>> What you need to do is decide which subdomain will be the "one true
>> one" and tell apache to redirect the other to it. Some people for
>> whatever reason are totally hating on our venerable "www" subdomain,
>> so they set up the www.whatever.com to redirect to whatever.com. You
>> can do the opposite if you are emotionally attached to www.
>>
>> -- Mitch
>>
>> On Mon, Aug 18, 2008 at 5:08 PM, Dan <dan at muchospanish.com> wrote:
>>>
>>> Hi, everyone
>>> My site loads http://muchospanish.com but not http://www.muchospanish.com
>>> By
>>> the way, I'm using Joomla 1.0.x
>>> Thanks.
>>> Dan
>>> _______________________________________________
>>> New York PHP SIG: Joomla! Mailing List
>>> http://lists.nyphp.org/mailman/listinfo/joomla
>>>
>>> NYPHPCon 2006 Presentations Online
>>> http://www.nyphpcon.com
>>>
>>> Show Your Participation in New York PHP
>>> http://www.nyphp.org/show_participation.php
>>>
>> _______________________________________________
>> New York PHP SIG: Joomla! Mailing List
>> http://lists.nyphp.org/mailman/listinfo/joomla
>>
>> NYPHPCon 2006 Presentations Online
>> http://www.nyphpcon.com
>>
>> Show Your Participation in New York PHP
>> http://www.nyphp.org/show_participation.php
>>
>
> _______________________________________________
> New York PHP SIG: Joomla! Mailing List
> http://lists.nyphp.org/mailman/listinfo/joomla
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
_______________________________________________
New York PHP SIG: Joomla! Mailing List
http://lists.nyphp.org/mailman/listinfo/joomla

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php




More information about the Joomla mailing list