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 :\

2 Answers 2


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

  • Any alternative other than apache? :x
    – CodeGuru
    Jan 21, 2013 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 ? Jan 21, 2013 at 10:07

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]
  • Any alternative other than apache? :x
    – CodeGuru
    Jan 21, 2013 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, 2013 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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