I found this thread useful ...just thought I'd add to it incase anyone else needs this.This is how I have my .htaccess file setup in www/ <IfModule mod_rewrite.c> RewriteEngine on
RewriteCond %{http_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> On Feb 16, 7:20 pm, Manu0310 <[EMAIL PROTECTED]> wrote: > Hey guys I finally solved this. > Thanks Thiago for your help, you pointed me in the right direction, so > here is the code to place in your .htaccess file: > > RewriteCond%{HTTP_HOST} ^dealque.com$ > RewriteRule ^(.*)$http://www.dealque.com/$1[R=301,L] > > Basically the same code you gave me just added a $ at the end of first > expression. > > Thanks again. > > On Feb 16, 10:10 am, "Thiago Paes" <[EMAIL PROTECTED]> wrote: > > > Probably yes... > > > On Feb 16, 2008 1:08 PM, Manu0310 <[EMAIL PROTECTED]> wrote: > > > > Looks good... but would I be able to put that in my .htaccess files?I > > > don't have full access to the server with the hosting solution I am > > > on. :) > > > > On Feb 16, 10:02 am, "Thiago Paes" <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > > you can try put this lines in your Apache configuration, (ex.: > > > > /etc/apache/sites-enable/default): > > > > > RewriteEngine on > > > > RewriteCond%{HTTP_HOST} ^mysite.com > > > > RewriteRule ^(.*)$http://www.mysite.com/$1[R=permanent,L] > > > > > It's more fast than a function/method ;) > > > > > []'s > > > > > Thiago Paes > > > > > On Feb 16, 2008 12:57 PM, Manu0310 <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > > I want to be able to redirect users who hit my site from mysite.com to > > > > >www.mysite.com. I know this can be achieved with a 301 redirect > > > > > specified in the .htaccess file. > > > > > > I have tried a few techniques and nothing seems to work with cakePHP. > > > > > > Has anyone solved this problem or had a similar issue? > > > > > I use a lot of ajax calls and it is important that users hit > > > > >www.mysite.com > > > > > when they try to access it without the www. > > > > > > Thanks > > > > > -- > > > > ________________________________________________________ > > > > Thiago Paes -www.thiagopaes.com.br-Linuxer:#224062 > > > -- > > ________________________________________________________ > > Thiago Paes -www.thiagopaes.com.br-Linuxer: #224062 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---