tags:

views:

186

answers:

2

Hi There

I am trying to find the best way of displaying content that resides under a different server location.

So I have a domain where have the main site content is located at:

/home/user/my_site/www/

and accessed at:

www.example.com

I have another site (a blog) located at:

/home/user/the_blog/www/

I wish to get the blog content to appear at:

www.example.com/news

I was planning on using an .htaccess file at my_site to set the rules for the path:

/news

However the content for the blog resides outside the .htaccess document root, so although U can set a rule it won't be able to access this content.

Is it possible to change the document root somewhere higher up the chain?

Or is it possible to just create a symlink for the /news folder? Is this even advisable?

Thanks in advance

Tom

A: 

Since both directories aren't in your DocumentRoot, I don't see how mod_rewrite can work here. And I don't think anyone would recommend symlinking. The way I see it, there are only two ways out of this: either change your DOcumentRoot or move the latter directory into the current DocumentRoot.

Ramkumar Ramachandra
Hi Artagnon, Sorry perhaps i was unclear in what i was saying, but the root of www.example.com is the directory /home/user/my_site/www/ Tom
Tom
Yes, I'm sorry. Gumbo's solution seems to be perfect.
Ramkumar Ramachandra
A: 

You could set an alias to that location:

Alias /news /home/user/the_blog/www

But that can only be set in the server or virtual host configuration context and not in a .htaccess file.

Gumbo
Thanks Gumbo, that is what I am looking for, and if I can't implement it on the server, due to access restrictions, I will just have to move all the content under my_site (sigh).
Tom