1

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

CodeGuru
  • 134
  • 1
  • 1
  • 10

2 Answers2

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

    ....
</VirtualHost>
cyberhicham
  • 202
  • 2
  • 13
  • Any alternative other than apache? :x – CodeGuru Jan 21 '13 at 05:30
  • You can do it with PHP like this : ``header('Location: http://webmail.domain.com/3rdparty/roundcube');`` in your http://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 ? – cyberhicham Jan 21 '13 at 10:07
1

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]
Grumpy
  • 2,979
  • 18
  • 23
  • Any alternative other than apache? :x – CodeGuru Jan 21 '13 at 05: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