Roundcube Community Forum

 

How to make: mail.site.com to www.mail.site.com ?

Started by inf4mi, April 11, 2007, 05:49:52 PM

Previous topic - Next topic

inf4mi

How to make:  
When user prints mail.site.com , but it is automatically goes to //www.mail.site.com ?

Thank U!

_AA_

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.

inf4mi

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

flosoft

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;
?>