I'm trying to produce a Web Site that will produce local and external views depending on where the user is from and which directory they are in. The site is running on Apache. I also have perl and mySQL at my disposal. Ideally the external and local directories/views should be transparent to the user. Such that:
would refer to either

I've tried to solve this by protecting the
local dir with a .htaccess. And redirecting
on an errorDocument Apache command but this
doesn't work with relative dirs. I think
maybe what I need to use is the rewrite module in Apache and am hoping that maybe
someone else has had a similar experience
who could point me in the right direction.

PS: Recap:
Directories may be either:
- viewable by all
- external only
- local only
- local & external