mask webmail URI under subdomain [resolved]

Using a single web hosting account to host multiple sites

mask webmail URI under subdomain [resolved]

Postby BMN » Sun Jul 26, 2009 4:03 am

hello
I'm trying to mask a URI to webmail client under a subdomain.
Searching around this forum, I was able to mask the redirection.
The problem is, that all img and css files nested in webmail's client, aren't displayed. Directory tree is long, and if I'd like to switch between webmail cmses (couple available) I'd have to edit htaccess everytime.

Here's what I've done:
subdomain: http://webmail.mydomain.com
webmail URI http://mydomain.com/roundcube/ (also squirrel, and atmail are available)

.htaccess
Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^webmail\.mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://mydomain.com/roundcube/ [P,L]

uri to images:
http://mydomain.com/roundcube/skins/default/common.css
http://mydomain/roundcube/skins/default/images/

I have no idea how to mask all directories, so I kindly ask for help here.

I found a similar thread, but it's kind of ... old, and has no replies.
viewtopic.php?t=81
Last edited by BMN on Sun Jul 26, 2009 6:15 am, edited 1 time in total.
BMN
 
Posts: 39
Joined: Wed Jul 05, 2006 2:15 am

Postby richardk » Sun Jul 26, 2009 5:19 am

What's wrong with the paths?
What are the paths in the source of the page?

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^webmail\.mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://mydomain.com/roundcube/$1 [P,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby BMN » Sun Jul 26, 2009 6:12 am

works perfectly !
I thought $1, $2 etc are mod rewrite's variables, used to represent url chains
and com$ -> (.*)$
thx once more
BMN
 
Posts: 39
Joined: Wed Jul 05, 2006 2:15 am


Return to Domain Handling

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron