AFAIK ServerAlias will make both domains serve same content and not do a redirect. Effectively that would be two different domains service the same content (not good SEO wise).
Are u sure mod_rewrite is enabled and that for the directory you have 'AllowOverride All' instead of 'AllowOverride None' ? -- Bibek Shrestha bibekshrestha at gmail dot com Twitter: http://twitter.com/bibstha "You mustn't be afraid to dream a little bigger, darling.", Eames to Arthur, Inception 2010 On Wed, Feb 22, 2012 at 4:32 PM, Chandan Gupta <[email protected]>wrote: > > > On Wed, Feb 22, 2012 at 3:55 PM, Aadish Shrestha <[email protected]> wrote: > >> You can the ServerAlias directive. No need to use the rewrite rules, but >> you will need to have access to the server configuration. >> > I do have all the access to server configuration... would you mind > explaining that ServerAlias directive.. meanwhile I will try googling :) > > Regards, > Chandan > >> On Feb 11, 2012 8:28 AM, "Chandan Gupta" <[email protected]> >> wrote: >> > >> > Hi All, >> > >> > I wanted to redirect all the non www links of my blog to www links >> > i.e >> > http://linuxcandy.com should come as www.linuxcandy.com >> > for which editing .htaccess file in server helped >> > >> > RewriteEngine On >> > RewriteCond %{HTTP_HOST} !^www\. >> > RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] >> > >> > But, it directs only the home page and not other links. >> > For example if I open a link w/o www like >> > >> > >> http://linuxcandy.com/2012/02/how-to-install-wordpress-in-ubuntudebain-system-or-server.html >> > >> > >> > it doesn't take me to >> > >> http://www.linuxcandy.com/2012/02/how-to-install-wordpress-in-ubuntudebain-system-or-server.html >> > >> > Am I missing something in above code for this to work ? or I need to >> add some more line too ? >> > >> > Thanks, >> > Chandan >> > >> > -- >> > FOSS Nepal mailing list: [email protected] >> > http://groups.google.com/group/foss-nepal >> > To unsubscribe, e-mail: [email protected] >> > >> > Mailing List Guidelines: >> http://wiki.fossnepal.org/index.php?title=Mailing_List_Guidelines >> > Community website: http://www.fossnepal.org/ >> >> -- >> FOSS Nepal mailing list: [email protected] >> http://groups.google.com/group/foss-nepal >> To unsubscribe, e-mail: [email protected] >> >> Mailing List Guidelines: >> http://wiki.fossnepal.org/index.php?title=Mailing_List_Guidelines >> Community website: http://www.fossnepal.org/ >> > > -- > FOSS Nepal mailing list: [email protected] > http://groups.google.com/group/foss-nepal > To unsubscribe, e-mail: [email protected] > > Mailing List Guidelines: > http://wiki.fossnepal.org/index.php?title=Mailing_List_Guidelines > Community website: http://www.fossnepal.org/ > -- FOSS Nepal mailing list: [email protected] http://groups.google.com/group/foss-nepal To unsubscribe, e-mail: [email protected] Mailing List Guidelines: http://wiki.fossnepal.org/index.php?title=Mailing_List_Guidelines Community website: http://www.fossnepal.org/
