Re: How can I force www. to always be in my domain name?
The marketing department disagrees with that, and unfortunately we need to match our marketing materials. On Jan 21, 9:53 am, Smelly_Eddie wrote: > In my opinion you should be doing just the opposite. > > WWW was used when computers needed the sub.domain to be aware of what > type of content they were about to receive. > > Since web-pages today are becoming RIA and browsers are so robust the > need is deprecated, and I and may others argue that www should be > deprecated to. > > Users that visit any of my domains using the www prefix will be > rerouted to the top domain, without the prefix. Google allows > webmasters to specify this as well so it will only crawl and show my > pages as top-domain.org. > > An interesting site that takes my side;http://no-www.org/ > > On Jan 21, 2:30 am, Jon Bennett wrote: > > > > > Hi Parris, > > > > > > > > > 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] > > > > > > > I need to accomplish something similar, I don't need to worry about > > SSL, but I do have 3 domains, so far I have: > > > RewriteCond %{HTTP_HOST} !^www.domain1.co.uk$[NC] > > RewriteCond %{HTTP_HOST} !^www.domain2.co.uk$[NC] > > RewriteRule ^(.*)$http://www.maindomain.co.uk/$1[R=301,QSA,L] > > > RewriteRule ^$ app/webroot/ [L] > > RewriteRule (.*) app/webroot/$1 [L] > > > but this isn't doing anything, except the normal cake rewrite, any ideas? > > > Cheers, > > > Jon > > > -- > > > jon bennett > > w:http://www.jben.net/ > > iChat (AIM): jbendotnet Skype: jon-bennett- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How can I force www. to always be in my domain name?
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): AllowOverride all Then all you have to do is edit your .htaccess file which should be in /path_to/cake/app/webroot: 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] Hope this helps, Faifas On Fri, Feb 13, 2009 at 21:27, Parris 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How can I force www. to always be in my domain name?
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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How can I force www. to always be in my domain name?
In my opinion you should be doing just the opposite. WWW was used when computers needed the sub.domain to be aware of what type of content they were about to receive. Since web-pages today are becoming RIA and browsers are so robust the need is deprecated, and I and may others argue that www should be deprecated to. Users that visit any of my domains using the www prefix will be rerouted to the top domain, without the prefix. Google allows webmasters to specify this as well so it will only crawl and show my pages as top-domain.org. An interesting site that takes my side; http://no-www.org/ On Jan 21, 2:30 am, Jon Bennett wrote: > Hi Parris, > > > > > > > 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] > > > > > I need to accomplish something similar, I don't need to worry about > SSL, but I do have 3 domains, so far I have: > > RewriteCond %{HTTP_HOST} !^www.domain1.co.uk$[NC] > RewriteCond %{HTTP_HOST} !^www.domain2.co.uk$[NC] > RewriteRule ^(.*)$http://www.maindomain.co.uk/$1[R=301,QSA,L] > > RewriteRule ^$ app/webroot/ [L] > RewriteRule (.*) app/webroot/$1 [L] > > but this isn't doing anything, except the normal cake rewrite, any ideas? > > Cheers, > > Jon > > -- > > jon bennett > w:http://www.jben.net/ > iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How can I force www. to always be in my domain name?
Hi Parris, > > > >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] > > I need to accomplish something similar, I don't need to worry about SSL, but I do have 3 domains, so far I have: RewriteCond %{HTTP_HOST} !^www.domain1.co.uk$ [NC] RewriteCond %{HTTP_HOST} !^www.domain2.co.uk$ [NC] RewriteRule ^(.*)$ http://www.maindomain.co.uk/$1 [R=301,QSA,L] RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] but this isn't doing anything, except the normal cake rewrite, any ideas? Cheers, Jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How can I force www. to always be in my domain name?
I think it would be nice to optimize this for any domain, with any folder, or possibly any subdomain, or any combo of all of that... Anyone have ideas? On Jan 20, 3:25 pm, Parris wrote: > Ok got it: > > > 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] > > > On Jan 20, 2:42 pm, Parris 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How can I force www. to always be in my domain name?
Ok got it: 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] On Jan 20, 2:42 pm, Parris 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How can I force www. to always be in my domain name?
For example if my website were awesome.com. When the user gets there it should automatically forward them to http://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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---