Ok got it:

<IfModule mod_rewrite.c>
   RewriteEngine on
        RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
        RewriteCond %{HTTPS}s ^on(s)|off
        RewriteRule ^(.*)$ http%1://www.domain.com/$1 [R=301,QSA,L]

        RewriteRule    ^$ app/webroot/    [L]
        RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

On Jan 20, 2:42 pm, Parris <[email protected]> wrote:
> For example if my website were awesome.com. When the user gets there
> it should automatically forward them tohttp://www.awesome.com. Also
> this should happen always (unless SSL is involved then the there
> should be an s after http (I already have that working)). I suppose I
> could create a component and then add it to every controller that does
> this; however, that seems like a bad approach (if i am doing it
> everywhere then it should only be stated once in one spot).
>
> Whats the best way to do this?
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
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