You are here: Re: [PHP] about the absolutely path « PHP « IT news, forums, messages
Re: [PHP] about the absolutely path

Posted by "Richard Lynch" on 06/07/05 01:02

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация