Page 1 of 1

Complete URL masking with mod_rewrite

Posted: Mon Jul 05, 2004 3:22 pm
by pickle
Hi All,

I've searched many a website for a solution to this, and I haven't found one yet.

What I'm trying to do is essentially make one sub-domain display the pages from another sub-domain.

So, if I've got a request for a file at:

http://users.server.com/joe_user/test.html

I want it to display the files found at:

http://www.server.com/departments/users ... /test.html

So far, this is all I've been able to find that sounds relevant. I'm not an ace with this stuff, so I'm not really sure why this isn't working. This .htaccess file is found at the root of the sub-domain

Code: Select all

RewriteEngine on
RewriteBase /

RewriteRule ^/(.*)$ http://www.server.com/departments/users/$1  їR,L]
Any ideas? Thanks.

Almost forgot: Both subdomains are hosted on the same Linux box.