Hello Paris,

if you would like to make all users go to www. instead of your domain only,
you should change some settings in your apache config.

First, modify your vhost file (if possible):

<Directory /path_to/cake/app/webroot>
        AllowOverride all
</Directory>

Then all you have to do is edit your .htaccess file which should be in
/path_to/cake/app/webroot:

<IfModule mod_rewrite.c>
    RewriteEngine On

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

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

Hope this helps,
Faifas


On Fri, Feb 13, 2009 at 21:27, Parris <[email protected]> wrote:

>
> ahh. yea i never thought of it that way; however, the issue goes
> beyond that. How about for the purposes of SSL. If SSL is enabled on
> www.x.com then it will not work on x.com. So in some cases you have no
> choice. Unless you want to change your SSL.
>
> Also if sessions/cookies understood that there are no differences
> between www.x.com and x.com then this routing issue would not even be
> important.
>
> Also a counter to your argument. If we are always specifying a
> subdomain then shouldn't we always specify www. ? The format is always
> sub.domain.com, but now you are saying JUST for the main domain we
> should change that.
>
> I understand the stance you described though and agree with it;
> however, I am playing devils advocate here.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to