|
Home > Archive > Web Servers on Unix and Linux > May 2004 > mod_rewrite - 'virtual-virtual' directories ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
mod_rewrite - 'virtual-virtual' directories ?
|
|
| Richard Shea 2004-05-30, 11:53 pm |
| Hi - I have an account with a shared hoster (call it abc.com) that
gives me a subdomain mine.abc.com.
I use a 'WebForwarding' service so that when a user requests a URI
from one of my own domains, www.foo.com, they get a 302 sending them
to mine.abc.com/foo/.
I would like the user to see in their browser address bar
www.foo.com/a.html (if that's what they asked for) rather than
mine.abc.com/foo/a.html.
As an experiment I have used the following directives ...
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^(.*)foo/(.*)$ index1.html
.... to serve index1.html whenever a file from 'foo' is requested. This
works and the URL displayed in the browser doesn't show that
index1.html is being served instead.
So is the next step possible ? Bearing in mind the 'webforwarding' how
could a user request www.foo.com/a.html, get served
mine.abc.com/foo/a.html but see only www.foo.com/a.html in the address
bar.
Thanks
Richard.
| |
| Claire Tucker 2004-05-31, 7:53 am |
| On 30 May 2004 20:43:12 -0700, richardshea@fastmail.fm (Richard Shea)
wrote:
[snip!]
> Bearing in mind the 'webforwarding' how
>could a user request www.foo.com/a.html, get served
>mine.abc.com/foo/a.html but see only www.foo.com/a.html in the address
>bar.
Other than having your web forwarding service forward using a
single-frame frameset rather than a 302 Found response -- a pretty bad
idea since it'll break navigation and bookmarking of pages within the
site -- there is no way to do this.
You must either get www.foo.com pointing at the same host as
mine.abc.com and have the server admin alias in that domain or just
ignore the issue and realise that most people don't pay any attention
to the location bar anyway.
-Claire
|
|
|
|
|