Re: about the absolutely path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, June 6, 2005 1:54 am, yangshiqi said:
> I have a php application (let's call it app A) which is developed
> separated
> in a test domain name, like http://testa.xxx.com <http://testa.xxx.com/>
> /.
>
> But now I have to move it to another app (called B) using
> http://testb.xxx.com <http://testb.xxx.com/> /, and the app A becomes just
> a
> subsystem of app B.
>
> The access url is changed to http://testb.xxx.com/a/.
>
> Then I meet a problem that the app A 's links, the path and other elements
> in it are set like '/Main.php', '/art/logo.gif' by an absolutely path.
>
> The app A is very independent and I do not want to disperse it to app B.
>
> So how can I get this effect: when the user input the url, '
> http://testb.xxx.com/a/ ', the app A will work fine?
>
> Can I just modify some configuration about yapache to fit this
> requirement?

You could try the BASEHREF tag, but I don't think that ever got
wide-spread browser support, much less W3C status...

mod_rewrite seems like it would be good, but how would you know to use
/a/Foo.html instead of /Foo.html?  I guess you could do it only on
ErrorDocument, but then you'll be stuck if you ever need to have
/c/Foo.html...  Might be worth pursuing.

You could, perhaps, keep all of a on testa.xxx.com, and force B to link to
a.xxx.com rather than really move it.  They can co-exist on the same
server with VirtualHost settings.  [He says blithely, never having
actually got that to work on his own box...]

Hmmmm, that reminds me...  Does VirtualHost rely on, like, /etc/hosts
having hostnames for all those made-up hostnames I use?  I had assumed all
those hostnames were just internal unique markers for httpd.conf with no
real-worl meaning...  Was that just silly of me or what?

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux