Roundcube Community Forum

Recycle Bin => Recycle Bin => Topic started by: inf4mi on April 11, 2007, 05:49:52 PM

Title: How to make: mail.site.com to www.mail.site.com ?
Post by: inf4mi on April 11, 2007, 05:49:52 PM
How to make:  
When user prints mail.site.com , but it is automatically goes to //www.mail.site.com ?

Thank U!
Title: Re: How to make: mail.site.com to www.mail.site.com ?
Post by: _AA_ on April 12, 2007, 04:14:09 AM
From the .htaccess file that comes with drupal.

 # If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
 # RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
 # RewriteRule .* http://www.example.com/ [L,R=301]
 #
 # If you want the site to be accessed only WITHOUT the www. , adapt and uncomment the following:
 # RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
 # RewriteRule .* http://example.com/ [L,R=301]


Also, make sure you server name is mail.example.com and not //www.mail.example.com or something similar.
Title: Re: How to make: mail.site.com to www.mail.site.com ?
Post by: inf4mi on April 12, 2007, 05:07:07 PM
Quote from: _AA_ From the .htaccess file that comes with drupal.


Also, make sure you server name is mail.example.com and not //www.mail.example.com or something similar.

I also tried this way - but for this mail - it doesn`t work

But
Thank U
Title: Re: How to make: mail.site.com to www.mail.site.com ?
Post by: flosoft on April 25, 2007, 09:51:07 AM
try it with a simple PHP redirect?

http://be.php.net/manual/en/function.header.php

header("Location: http://www.example.com/"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>