Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #361858
    Anonymous
    Guest

    Hey all, i´m kinda new to OS X Server and i´m trying to do a simple rewrite in Tiger for a virtual host but i can´t get it to work. I want that when my users type in mail.domain.com they end up at domain.com/webmail

    I know this is probably a silly question but i spent to much time in the GUI trying to figure out that new alias settings but with no luck. So could anyone please help me out here and i would really appriciate it!

    / Helena

    #361868
    Anonymous
    Guest

    Does not anyone of you professionals know how to do this?

    / Helena

    #361879
    Anonymous
    Guest

    Thank you Macshome for helping out and explaining.

    No matter how i read your examples i can´t seem to find a way to redirect a URL to a URL? Especially since the mail.example.com dont have a place in the filesystem it´s pretty hard redirecting it or am i missing something here?

    I just want to have mail.example.com to point to example.com/webmail

    #361880
    Anonymous
    Guest

    I tried creating a new site in server admin with the mail.example.com and i pointed the sites home folder to /library/webserver/documents/webmail/index.html but that didnt work, it says “Webmail is not enabled on thie server” (wich it of course it on all sites). Any ideas?

    #364585
    ryan
    Participant

    try putting this in your /etc/httpd/sites/ file:
    RewriteCond %{HTTP_HOST} ^mail\.domain\.com
    RewriteRule ^(.*)$ http://domain.com/mail$1 [R,L]

    under the rewrite section (if you have one, create one), eg:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} ^TRACE
    RewriteRule .* – [F]

    RewriteCond %{HTTP_HOST} ^mail\.domain\.com
    RewriteRule ^(.*)$ http://domain.com/mail$1 [R,L]
    </IfModule>

    then you also need to make sure that the rewrite module is
    enabled in your /etc/httpd/httpd.conf file:
    LoadModule rewrite_module libexec/httpd/mod_rewrite.so

    (and then restart your web server.)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Comments are closed