Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm thinking of redirect the user to http://webmail.domain.com/3rdparty/roundcube directly instead of http://webmail.domain.com/

Is there anyway i can do this, it only seem that i can edit the"Sub domain" on route 53, not sure if there is a way to have the "/3rdparty/roundcube" behind "http://webmail.domain.com"

Or any other alternative of doing so? Was thinking of TinyURL :\

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

One way to do it is to use Redirect rule with Apache2 virtualhosts

<VirtualHost *:80>
    ServerName webmail.domain.com
    Redirect 301 /  http://webmail.domain.com/3rdparty/roundcube

    ....
</VirtualHost>
share|improve this answer
    
Any alternative other than apache? :x –  User1291223 Jan 21 '13 at 5:30
    
You can do it with PHP like this : header('Location: http://webmail.domain.com/3rdparty/roundcube'); in your webmail.domain.com/index.php, but it's overkill imo, apache2 way (virtualhost or .htaccess) is the normal way to do it. are you using another webserver than Apache ? –  Hicham LEMGHARI Jan 21 '13 at 10:07
add comment

You can do it via .htaccess if you're using apache. This isn't really a job for DNS.

RewriteCond %{HTTP_HOST} ^webmail.domain.com$ [NC]
RewriteRule ^$ /3rdparty/roundcube [R=301,L]
share|improve this answer
    
Any alternative other than apache? :x –  User1291223 Jan 21 '13 at 5:28
    
@RainbowHat It's best to do it at server level. And depends on which server you are running. You need to provide more information if you want alternative answers. –  Grumpy Jan 21 '13 at 19:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.