Re: absolute vs relative path?
| From: | Geoff | Date: | Wed, 25 Jan 2006 14:53:29 +0000 |
| Subject: | Re: absolute vs relative path? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229234@lists.php.net to get a copy of this message | ||
On 25 Jan 2006 at 15:22, Barry wrote:
> Geoff wrote:
> > On 25 Jan 2006 at 15:19, William Stokes wrote:
> >
> >
> >>Hello,
> >>
> >>I Have a web site on one server and a test site on another. How can I build
> >>the hyperlinks so that they work on both servers without modification.
> >>
> >>For example build this link dynamically:
> >>"http://www.domain.com/www/test.php
> >>
> >>In test server the same should be:
> >>"http://internalserver/www/test.php
> >
> >
> > Non-php solution:
> >
> > Use relative links. Instead of referring to a page as
> > "http://www.domain.com/www/test.php", rather
> > just use
> > "/www/test.php" or even just "/test.php", if the script containing
> > that link is already in /www. Thus your links will look the same on
> > both versions.
>
> /test.php would refer to root.
> so it would be www.domain.com/test.php
> not www.domain.com/www/test.php (!)
>
> probably a small typo ;)
Oops, twas indeed. Well spotted :->
>
> Barry
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>