From: Christopher R. P. <fo...@fo...> - 2010-05-15 23:03:38
|
Ah okay! I only asked, because my previous nameserver (where I registered the domains) I could setup redirects there. That answers my question! Thank you very much! 2010/5/16 Steve Holdoway <st...@gr...> > On Sat, 2010-05-15 at 17:28 -0400, Richard Shebora wrote: > > The dns setup is step one. Step two is configure apache to do the > redirect. > > Add following code to your .htaccess or httpd.conf ... > > > > RewriteEngine On > > RewriteCond %{HTTP_HOST} ^domain.com$ [NC] > > RewriteRule ^(.*)$ http://www.domain.com$1 [R=301,L] > > > > There's some escaping and a slash missing, > > RewriteEngine On > RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] > RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] > > I usually use the logic 'if it's not www.domain.com, then force it'... > > RewriteEngine On > RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC] > RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] > > Steve > > > > ------------------------------------------------------------------------------ > > > - > Forwarded by the Webmin mailing list at > web...@li... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-list > > -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments |